same security filter issue

A place for users and developers of the Xataface to discuss and receive support.

same security filter issue

Postby samhans » Sun Feb 19, 2012 10:35 am

hai Steve.

in a demand table i have a status column. what i want that when the demand was fulfilled and store incharge has changed the status to closed. it should be removed from the list view.

how can i do this because already i have used the security filter option and i cannot redeclare it in same delegate class.
samhans
 
Posts: 96
Joined: Fri Feb 10, 2012 1:22 am

Re: same security filter issue

Postby shannah » Sun Feb 19, 2012 11:12 am

I probably wouldn't use a security filter for this - as a security filter will remove it from all aspects of the application. If you just want it gone from the list view, then perhaps use the beforeHandleRequest method of the application delegate class to add the query parameter conditionally.

e.g.
Code: Select all
function beforeHandleRequest(){
    $app = Dataface_Application::getInstance();
    $query =& $app->getQuery();
    if ( !$_POST and $query['-table'] == 'mytable' and !@$query['status'] ){
        $query['status'] = '!=closed';
    }
}
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: same security filter issue

Postby samhans » Sun Feb 19, 2012 12:10 pm

thanks Steve.
samhans
 
Posts: 96
Joined: Fri Feb 10, 2012 1:22 am


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 19 guests

Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved