Esempio n. 1
0
 public function addPermission(ActionInterface $action, $grant_deny = 0)
 {
     $permission = new EloquentPermission();
     $permission->action_id = $action->getId();
     $permission->permission = $grant_deny;
     return $this->permissions()->save($permission);
 }
Esempio n. 2
0
 /**
  * Attempts to remove the given action from this privilege
  *
  * @param ActionInterface $action
  * @return boolean
  */
 public function removeAction(ActionInterface $action)
 {
     /**
      * @var EloquentAction $action
      */
     return $action->delete();
 }