/** * 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; }
/** * * @param PermissionsInterface $permissions */ private function setupPermissions(PermissionsInterface $permissions = null) { if ($this->user) { $permissions->grant($this->user, PermissionsInterface::PERMISSION_ALL); } }