in users.php
<?
function isAdmin(){
$auth =& Dataface_AuthenticationTool::getInstance();
$user =& $auth->getLoggedInUser();
if ( $user and $user->val('Role') == 'ADMIN') return true;
return false;
}
class tables_users {
function role__permissions(&$record){
if (!isAdmin() ) return array('edit'=>0);
return null;
}
}
?>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment