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); }
public function hasRole(Moonlake_Auth_Role $role) { foreach ($this->getRoles() as $r) { if ($role->getId() == $r->getId()) { return true; } } return false; }