hai
a problem in giving permissions. what i want that a particular role can view a table.
from the application delegate i have given permission to only admin. all others are denied.
my demand.php file is there in the tables/demand
<?php
class tables_demand {
function getPermissions(&$record){
//if ( !isset($user) ) return Dataface_PermissionsTool::NO_ACCESS();
$auth =&Dataface_AuthenticationTool::getInstance();
$user =& $auth ->getLoggedInUser();
$role = $user->val('Role');
if ( isAdmin() ) return Dataface_PermissionsTool::ALL();
if($user->val('Role') == 'DEMANDE' ) return Dataface_PermissionsTool::getRolePermissions($role);
return Dataface_PermissionsTool::NO_ACCESS();
}
}
?>
this works fine when i logged in , but when i logged out and click on the demand tab, i get the error
Fatal error: Call to a member function val() on a non-object in C:\xampp\htdocs\www\tables\demand\demand.php on line 11
the line 11 is the if ($user->val(role....... line.
can anyone help me i am stuck at this point.
thanks in advance