Esempio n. 1
0
 public function deleteAuthorizationForRole($context, Moonlake_Auth_Role $role, $action)
 {
     $cond = new Moonlake_Model_Condition();
     $cond->is('context', $context);
     $cond->is('role', $role->getId());
     $cond->is('action', $action);
     $this->model->deleteEntriesByCondition($cond);
 }
Esempio n. 2
0
 public function hasRole(Moonlake_Auth_Role $role)
 {
     foreach ($this->getRoles() as $r) {
         if ($role->getId() == $r->getId()) {
             return true;
         }
     }
     return false;
 }