PrivilegeManager
class PrivilegeManager implements PrivilegeManagerInterface (View source)
An access decision voter manager
Properties
protected ObjectManagerInterface | $objectManager | ||
protected Context | $securityContext | ||
protected bool | $allowAccessIfAllAbstain | If set to true access will be granted for objects where all voters abstain from decision. |
Methods
Returns true, if the given privilege type is granted for the given subject based on the current security context.
Returns true, if the given privilege type would be granted for the given roles and subject
Returns true if access is granted on the given privilege target in the current security context
Returns true if access is granted on the given privilege target in the current security context
No description
No description
No description
Details
__construct(ObjectManagerInterface $objectManager, Context $securityContext)
No description
bool
isGranted(string $privilegeType, mixed $subject, string $reason = '')
Returns true, if the given privilege type is granted for the given subject based on the current security context.
bool
isGrantedForRoles(array $roles, string $privilegeType, mixed $subject, string $reason = '')
Returns true, if the given privilege type would be granted for the given roles and subject
bool
isPrivilegeTargetGranted(string $privilegeTargetIdentifier, array $privilegeParameters = [])
Returns true if access is granted on the given privilege target in the current security context
bool
isPrivilegeTargetGrantedForRoles(array $roles, string $privilegeTargetIdentifier, array $privilegeParameters = [])
Returns true if access is granted on the given privilege target in the current security context
protected PrivilegePermissionResult
applyPrivilegeToResult(PrivilegePermissionResult $result, PrivilegeInterface $privilege = null)
No description
protected Closure
getPrivilegeByTypeReducer(string $privilegeType)
No description
protected Closure
getPrivilegeSubjectFilter(mixed $subject)
No description