Page 1 of 1

Authentification and redirect URL

PostPosted: Mon Mar 22, 2010 3:26 pm
by halodrio
Hello,

I use xataface in the Version 1.2.2 1616

I have configured a “Setting up Basic Authentication” and “Limiting Access Based on User” as described in http://xataface.com/wiki/authentication. This works very fine and I also do a update to the function getPermissions to get the user and the permissions from my project user table. The returnvalue in the function getPermissions (&$record) is Dataface_PermissionsTool::ALL().

But if I log in with a valid user the URL redirect automatically to ./xataface/index.php?-table=termine&-action=feed&-cursor=0&-skip=0&-limit=30&-mode=list as a know from the RSS feed mode.
I call the page always with the URL ./xataface/index.php
Why is the URL after the login not ./xataface/index.php?-table=termine or ./xataface/index.php?-table=termine&-action=list as I know without the configured authentification?

Do anybody know this behaviour of the system? I think and hope it is not normal.

Thanks

Re: Authentification and redirect URL

PostPosted: Mon Mar 22, 2010 3:29 pm
by shannah
There are certain request parameters that are always available in the Xataface environment. If they are not supplied by GET or POST parameters, they will be set to default values. The library that generates links within the Xataface application (also used for redirect) passes these values explicitly in the GET parameters.

Re: Authentification and redirect URL

PostPosted: Tue Mar 23, 2010 11:36 am
by halodrio
Hi,

Can I influence this default values? In which part of the xataface project is the setting of the default parameters (specially after the login)

Re: Authentification and redirect URL

PostPosted: Tue Dec 14, 2010 9:27 pm
by charlietfl
Having exact same issue with a new install of 1.2.6.

I installed using Firefox 3.6 browser . I've deleted all my cookies and cached templates numerous times but for some reason login in Firefox always takes me to default table RSS feed with this query:
index.php?-table=events&-action=feed&-cursor=0&-skip=0&-limit=30&-mode=list

If I login as same user in Chrome or IE, I end up at root folder with no index.php or query showing as per expected behavior

Am stumped

Re: Authentification and redirect URL

PostPosted: Mon Jan 24, 2011 12:18 pm
by shellyk
halodrio wrote:Hi,

Can I influence this default values? In which part of the xataface project is the setting of the default parameters (specially after the login)

I have the same question. Any help is greatly appreciated.

Re: Authentification and redirect URL

PostPosted: Mon Jan 24, 2011 12:28 pm
by shannah
The easiest way to do this is probably by defining the beforeHandleRequest() method of the application delegate class and set the default query values there.

e.g.
Code: Select all
function beforeHandleRequest(){
    $query =& Dataface_Application::getInstance()->getQuery();
    if ( !@$query['-limit'] ) $query['-limit'] = 100;
    // etc...
}