class ManageVoter extends Voter

Voter for User access

Constants

MANAGE

Used for access to manage

MANAGE_ADD_ROLE

Used for access to manage-add-role

MANAGE_CONFIG

Used for access to manage-config

MANAGE_DISPLAY

Used for access to manage-display

MANAGE_DELETE

Used for access to manage-delete

MANAGE_DELETE_ROLE

Used for access to manage-delete-role

MANAGE_MODIFY

Used for access to manage-modify

ATTRIBUTES

Contains all the available attributes to check with in supports()

Properties

private ConfigServiceInterface $configService Stores ConfigServiceInterface
private AccessDecisionManagerInterface $decisionManager Stores AccessDecisionManagerInterface

Methods

__construct(ConfigServiceInterface $configService, AccessDecisionManagerInterface $decisionManager)

No description

bool
supports($attribute, $subject)

Checks if attribute and subject are supported

bool
voteOnAttribute($attribute, $subject, TokenInterface $token)

Votes if access is granted

bool
isAllowed($token)

Checks if user has sufficient rights

Details

at line 94
__construct(ConfigServiceInterface $configService, AccessDecisionManagerInterface $decisionManager)

Parameters

ConfigServiceInterface $configService
AccessDecisionManagerInterface $decisionManager

at line 107
protected bool supports($attribute, $subject)

Checks if attribute and subject are supported

Parameters

$attribute
$subject

Return Value

bool

at line 121
protected bool voteOnAttribute($attribute, $subject, TokenInterface $token)

Votes if access is granted

Parameters

$attribute
$subject
TokenInterface $token

Return Value

bool

Exceptions

LogicException

at line 148
private bool isAllowed($token)

Checks if user has sufficient rights

Parameters

$token

Return Value

bool