$acl
$acl : \Zend\Permissions\Acl\Acl
The authorizer service helps with user authorization (permission checking).
Constructor dependencies are passed as an array of key=>value
pair.
The required dependencies are:
logger
A PSR3 logger instance.acl
A Zend ACL (Access-Control-List) instance.resource
The ACL resource identifier (string).To check if a given ACL (passed in constructor) allows a list of permissions (aka privileges):
userAllowed(UserInterface $user, string[] $aclPermissions)
rolesAllowed(string[] $roles, string[] $aclPermissions)
rolesAllowed(array<mixed,string> $aclRoles, array<mixed,string> $aclPermissions) : boolean
array<mixed,string> | $aclRoles | The ACL roles to validate against. |
array<mixed,string> | $aclPermissions | The acl permissions to validate. |
Wether the permissions are allowed for a given list of roles.
userAllowed(\Charcoal\User\UserInterface $user, array<mixed,string> $aclPermissions) : boolean
\Charcoal\User\UserInterface | $user | The user to validate against. |
array<mixed,string> | $aclPermissions | The acl permissions to validate. |
Whether the permissions are allowed for a given user.