\AclUser\Mvc\Controller\PluginUserIsAllowedControllerPlugin

Controller plugin that can check whether user is allowed to access resource privilege

Summary

Methods
Properties
Constants
__construct()
userIsAllowed()
getPresentUserId()
getPresentUser()
No public properties found
No constants found
No protected methods found
$accessControlList
N/A
No private methods found
No private properties found
N/A

Properties

Methods

__construct()

__construct(\AclUser\Permissions\Acl\AccessControlList  $accessControlList) 

Constructor

Parameters

\AclUser\Permissions\Acl\AccessControlList $accessControlList

Object which is needed to get details about logged in user

userIsAllowed()

userIsAllowed(string  $resource, string  $privilege) : boolean

Check whether current user is allowed to access this resource and privilege

Parameters

string $resource
string $privilege

Returns

boolean —

whether user is permitted to access this route

getPresentUserId()

getPresentUserId() : integer

Get logged in user's id

Returns

integer —

the id of the logged in user

getPresentUser()

getPresentUser() : \AclUser\Mvc\Controller\Plugin\User

Get the entity object that corresponds to the logged in user

Returns

\AclUser\Mvc\Controller\Plugin\User