Example #1
0
 function requireSecurityGroup($category, $value, $type = 'module')
 {
     global $current_user;
     if (is_admin($current_user)) {
         return false;
     }
     return ACLAction::userNeedsSecurityGroup($current_user->id, $category, $value, $type);
 }
Example #2
0
 public function testuserNeedsSecurityGroup()
 {
     $this->assertFalse(ACLAction::userNeedsSecurityGroup('1', '', ''));
     //test with empty module and action
     $this->assertFalse(ACLAction::userNeedsSecurityGroup('1', 'Accounts', 'list'));
     //test with valid module and action
 }