Documentation

AbstractAclService
in package

AbstractYes

Table of Contents

Methods

getIdentity()  : IdentityInterface|null
Gets the user identity if logged in or null otherwise
hasIdentity()  : bool
Checks whether the user is logged in
isAllowed()  : bool
Check if a operation is allowed for the current role.
getAcl()  : Acl
Get the ACL.
getRole()  : string|RoleInterface
Get the current user's role.

Methods

hasIdentity()

Checks whether the user is logged in

public hasIdentity() : bool
Return values
bool

true if the user is logged in, false otherwise

isAllowed()

Check if a operation is allowed for the current role.

public isAllowed(string $operation, string|ResourceInterface $resource) : bool
Parameters
$operation : string

operation to be checked

$resource : string|ResourceInterface

Resource to be checked

Return values
bool

getRole()

Get the current user's role.

protected abstract getRole() : string|RoleInterface
Return values
string|RoleInterface

        
On this page

Search results