PHP Class Neos\Flow\Security\Aspect\PolicyEnforcementAspect

Datei anzeigen Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Property Type Description
$policyEnforcementInterceptor Neos\Flow\Security\Authorization\Interceptor\PolicyEnforcement The policy enforcement interceptor
$securityContext Neos\Flow\Security\Context

Public Methods

Method Description
__construct ( PolicyEnforcement $policyEnforcementInterceptor, Context $securityContext )
enforcePolicy ( Neos\Flow\Aop\JoinPointInterface $joinPoint ) : mixed The policy enforcement advice. This advices applies the security enforcement interceptor to all methods configured in the policy.

Method Details

__construct() public method

public __construct ( PolicyEnforcement $policyEnforcementInterceptor, Context $securityContext )
$policyEnforcementInterceptor Neos\Flow\Security\Authorization\Interceptor\PolicyEnforcement The policy enforcement interceptor
$securityContext Neos\Flow\Security\Context

enforcePolicy() public method

Note: If we have some kind of "run as" functionality in the future, we would have to manipulate the security context before calling the policy enforcement interceptor
public enforcePolicy ( Neos\Flow\Aop\JoinPointInterface $joinPoint ) : mixed
$joinPoint Neos\Flow\Aop\JoinPointInterface The current joinpoint
return mixed The result of the target method if it has not been intercepted

Property Details

$policyEnforcementInterceptor protected_oe property

The policy enforcement interceptor
protected PolicyEnforcement,Neos\Flow\Security\Authorization\Interceptor $policyEnforcementInterceptor
return Neos\Flow\Security\Authorization\Interceptor\PolicyEnforcement

$securityContext protected_oe property

protected Context,Neos\Flow\Security $securityContext
return Neos\Flow\Security\Context