ApiVoter
class ApiVoter extends Voter
Voter for Api access
Constants
API_USER_ADD_ROLE |
Used for access to api add-role |
API_USER_AUTHENTICATE |
Used for access to api authenticate |
API_USER_CHANGE_PASSWORD |
Used for access to api change password |
API_USER_CREATE |
Used for access to api create |
API_USER_DELETE |
Used for access to api delete |
API_USER_DELETE_ROLE |
Used for access to api delete-role |
API_USER_DISPLAY |
Used for access to api display |
API_USER_EXPORT |
Used for access to api export |
API_USER_LIST |
Used for access to api list |
API_USER_MODIFY |
Used for access to api modify |
API_USER_MODIFY_ROLE |
Used for access to api create |
API_USER_RESET_PASSWORD |
Used for access to reset password |
API_USER_SEARCH |
Used for access to api search |
ATTRIBUTES |
Contains all the available attributes to check with in supports() |
Properties
private ConfigServiceInterface | $configService | Stores ConfigServiceInterface | |
private AccessDecisionManagerInterface | $decisionManager | Stores AccessDecisionManagerInterface | |
private Request | $request | Stores curent Request |
Methods
No description
Checks if attribute and subject are supported
Votes if access is granted
Checks if user has sufficient rights
Checks if API is enabled
Checks if API is valid
Checks if user is owner or has admin rights
Checks if signup is allowed
Details
at line 144
__construct(ConfigServiceInterface $configService, AccessDecisionManagerInterface $decisionManager, RequestStack $requestStack)
at line 159
protected bool
supports($attribute, $subject)
Checks if attribute and subject are supported
at line 176
protected bool
voteOnAttribute($attribute, $subject, TokenInterface $token)
Votes if access is granted
at line 212
private bool
isAllowed($token)
Checks if user has sufficient rights
at line 221
private bool
isApiEnabled()
Checks if API is enabled
at line 230
private bool
isApiKeyValid($subject)
Checks if API is valid
at line 239
private bool
isOwner($token, $subject)
Checks if user is owner or has admin rights
at line 248
private bool
isSignupAllowed()
Checks if signup is allowed