class TransactionVoter extends Voter

Voter for Transaction access

Constants

ALL

Used for access to all

DISPLAY

Used for access to display

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

supports($attribute, $subject)

{@inheritdoc}

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

{@inheritdoc}

bool
isOwner($token, Transaction $transaction)

Checks if user is owner or has admin rights

bool
isAdmin($token)

Checks if user has admin rights

Details

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

Parameters

ConfigServiceInterface $configService
AccessDecisionManagerInterface $decisionManager

at line 70
protected supports($attribute, $subject)

{@inheritdoc}

Parameters

$attribute
$subject

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

{@inheritdoc}

Parameters

$attribute
$subject
TokenInterface $token

at line 101
private bool isOwner($token, Transaction $transaction)

Checks if user is owner or has admin rights

Parameters

$token
Transaction $transaction

Return Value

bool

at line 114
private bool isAdmin($token)

Checks if user has admin rights

Parameters

$token

Return Value

bool