setSecurityFilter, fieldX=A or fieldY=A
Posted: Mon Apr 02, 2012 6:39 am
Hi,
Using security filters, we can filter records to be listed for specific users as in the example below.
I want users to see only their records in a table. In my case, if fieldX or fieldY equals to the id of a user, then the record belongs to that user.
Is there a solution for this case?
Using security filters, we can filter records to be listed for specific users as in the example below.
- Code: Select all
function init(&$table) {
$user=&Dataface_AuthenticationTool::getInstance()->getLoggedInUser();
$table->setSecurityFilter(array('fieldX'=>$user->val('id')));
}
I want users to see only their records in a table. In my case, if fieldX or fieldY equals to the id of a user, then the record belongs to that user.
Is there a solution for this case?