Neos\Flow\Security\Authorization\PrivilegeManager::isPrivilegeTargetGranted PHP Method

isPrivilegeTargetGranted() public method

Returns TRUE if access is granted on the given privilege target in the current security context
public isPrivilegeTargetGranted ( string $privilegeTargetIdentifier, array $privilegeParameters = [] ) : boolean
$privilegeTargetIdentifier string The identifier of the privilege target to decide on
$privilegeParameters array Optional array of privilege parameters (simple key => value array)
return boolean TRUE if access is granted, FALSE otherwise
    public function isPrivilegeTargetGranted($privilegeTargetIdentifier, array $privilegeParameters = [])
    {
        return $this->isPrivilegeTargetGrantedForRoles($this->securityContext->getRoles(), $privilegeTargetIdentifier, $privilegeParameters);
    }

Usage Example

コード例 #1
0
 /**
  * Returns TRUE if access is granted on the given privilege target in the current security context
  * or if set based on the override decision value.
  *
  * @param string $privilegeTargetIdentifier The identifier of the privilege target to decide on
  * @param array $privilegeParameters Optional array of privilege parameters (simple key => value array)
  * @return boolean TRUE if access is granted, FALSE otherwise
  */
 public function isPrivilegeTargetGranted($privilegeTargetIdentifier, array $privilegeParameters = [])
 {
     if ($this->overrideDecision === false) {
         return false;
     } elseif ($this->overrideDecision === true) {
         return true;
     }
     return parent::isPrivilegeTargetGranted($privilegeTargetIdentifier, $privilegeParameters);
 }
All Usage Examples Of Neos\Flow\Security\Authorization\PrivilegeManager::isPrivilegeTargetGranted