Example #1
0
 /**
  * Sets the Permissions of an Organization
  *
  * @param PermissionsInterface $permissions
  *
  * @return $this
  */
 public function setPermissions(PermissionsInterface $permissions)
 {
     // Assure the user has always all rights.
     if ($this->user) {
         $permissions->grant($this->user, Permissions::PERMISSION_ALL);
     }
     $this->permissions = $permissions;
     return $this;
 }
Example #2
0
 /**
  *
  * @param PermissionsInterface $permissions
  */
 private function setupPermissions(PermissionsInterface $permissions = null)
 {
     if ($this->user) {
         $permissions->grant($this->user, PermissionsInterface::PERMISSION_ALL);
     }
 }