PHP Class Neos\Flow\Security\Authorization\TestingPrivilegeManager

Inheritance: extends PrivilegeManager
Show file Open project: neos/flow-development-collection

Protected Properties

Property Type Description
$overrideDecision boolean

Public Methods

Method Description
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 or if set based on the override decision value.
isPrivilegeTargetGranted ( string $privilegeTargetIdentifier, array $privilegeParameters = [] ) : boolean 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.
reset ( ) : void Resets the AccessDecisionManager to behave transparently.
setOverrideDecision ( boolean $overrideDecision ) : void Set the decision override

Method Details

isGranted() public method

Returns TRUE, if the given privilege type is granted for the given subject based on the current security context or if set based on the override decision value.
public isGranted ( string $privilegeType, mixed $subject, string &$reason = '' ) : boolean
$privilegeType string
$subject mixed
$reason string This variable will be filled by a message giving information about the reasons for the result of this method
return boolean

isPrivilegeTargetGranted() public method

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.
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

reset() public method

Resets the AccessDecisionManager to behave transparently.
public reset ( ) : void
return void

setOverrideDecision() public method

Set the decision override
public setOverrideDecision ( boolean $overrideDecision ) : void
$overrideDecision boolean TRUE or FALSE to override the decision, NULL to use the access decision voter manager
return void

Property Details

$overrideDecision protected property

protected bool $overrideDecision
return boolean