PrivilegeManagerInterface
interface PrivilegeManagerInterface (View source)
Contract for a privilege manager
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
Details
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