i am trying to filter access to records by username, my delegate file says:
function getPermissions(&$record) {
$auth =& Dataface_AuthenticationTool::getInstance();
$user =& $auth->getLoggedInUser();
if ( !$user ) return Dataface_PermissionsTool::NO_ACCESS();
$role = $user->val('role');
if ( $role == 'ADMIN' ){
return Dataface_PermissionsTool::ALL();
} else if ( $record && $record->val('email_domain') == $user->val('username')) {
return Dataface_PermissionsTool::ALL();
} else {
return Dataface_PermissionsTool::READ_ONLY();
}
}
this stops editing of all files except the correct ones however i want to limit viewing of records.
if i change the line:
return Dataface_PermissionsTool::READ_ONLY();
to:
return Dataface_PermissionsTool::NO_ACCESS();
then the list won't display at all
any ideas?