PHP Class Neos\Flow\Security\Authorization\PrivilegeManager

Inheritance: implements Neos\Flow\Security\Authorization\PrivilegeManagerInterface
Afficher le fichier Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Свойство Type Description
$allowAccessIfAllAbstain boolean If set to TRUE access will be granted for objects where all voters abstain from decision.
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface
$securityContext Neos\Flow\Security\Context

Méthodes publiques

Méthode Description
__construct ( Neos\Flow\ObjectManagement\ObjectManagerInterface $objectManager, Context $securityContext )
isGranted ( string $privilegeType, mixed $subject, string &$reason = '' ) : boolean Returns TRUE, if the given privilege type is granted for the given subject based on the current security context.
isGrantedForRoles ( array $roles, string $privilegeType, mixed $subject, string &$reason = '' ) : boolean Returns TRUE, if the given privilege type would be granted for the given roles and subject
isPrivilegeTargetGranted ( string $privilegeTargetIdentifier, array $privilegeParameters = [] ) : boolean Returns TRUE if access is granted on the given privilege target in the current security context
isPrivilegeTargetGrantedForRoles ( array $roles, string $privilegeTargetIdentifier, array $privilegeParameters = [] ) : boolean Returns TRUE if access is granted on the given privilege target in the current security context

Method Details

__construct() public méthode

public __construct ( Neos\Flow\ObjectManagement\ObjectManagerInterface $objectManager, Context $securityContext )
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface The object manager
$securityContext Neos\Flow\Security\Context The current security context

isGranted() public méthode

Returns TRUE, if the given privilege type is granted for the given subject based on the current security context.
public isGranted ( string $privilegeType, mixed $subject, string &$reason = '' ) : boolean
$privilegeType string The type of privilege that should be evaluated
$subject mixed The subject to check privileges for
$reason string This variable will be filled by a message giving information about the reasons for the result of this method
Résultat boolean

isGrantedForRoles() public méthode

Returns TRUE, if the given privilege type would be granted for the given roles and subject
public isGrantedForRoles ( array $roles, string $privilegeType, mixed $subject, string &$reason = '' ) : boolean
$roles array
$privilegeType string The type of privilege that should be evaluated
$subject mixed The subject to check privileges for
$reason string This variable will be filled by a message giving information about the reasons for the result of this method
Résultat boolean

isPrivilegeTargetGranted() public méthode

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)
Résultat boolean TRUE if access is granted, FALSE otherwise

isPrivilegeTargetGrantedForRoles() public méthode

Returns TRUE if access is granted on the given privilege target in the current security context
public isPrivilegeTargetGrantedForRoles ( array $roles, string $privilegeTargetIdentifier, array $privilegeParameters = [] ) : boolean
$roles array
$privilegeTargetIdentifier string The identifier of the privilege target to decide on
$privilegeParameters array Optional array of privilege parameters (simple key => value array)
Résultat boolean TRUE if access is granted, FALSE otherwise

Property Details

$allowAccessIfAllAbstain protected_oe property

If set to TRUE access will be granted for objects where all voters abstain from decision.
protected bool $allowAccessIfAllAbstain
Résultat boolean

$objectManager protected_oe property

protected ObjectManagerInterface,Neos\Flow\ObjectManagement $objectManager
Résultat Neos\Flow\ObjectManagement\ObjectManagerInterface

$securityContext protected_oe property

protected Context,Neos\Flow\Security $securityContext
Résultat Neos\Flow\Security\Context