com.atlassian.bitbucket.permission.PermissionValidationService |
A utility service for plugin developer to validate that the current user has a specific permission.
This service uses the PermissionService
to check for a permission and will throw
AuthorisationException
for any failed permission check.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
validate that the user is logged in
| |||||||||||
validate that the current user has the specified global permission
| |||||||||||
validate that the current user has the specified permission for the project
| |||||||||||
validate that the current user has the specified permission for the repository
|
validate that the current user has the specified global permission
permission | the requested permission. Must not be null and isGlobal()
must be true |
---|
AuthorisationException | if the current user is unauthorized |
---|
validate that the current user has the specified permission for the project
project | the target project. Must not be null |
---|---|
permission | the requested permission. Must not be null and isGlobal()
must be false |
AuthorisationException | if the current user is unauthorized |
---|
validate that the current user has the specified permission for the repository
repository | the target repository. Must not be null |
---|---|
permission | the requested permission. Must not be null and isGlobal()
must be false |
AuthorisationException | if the current user is unauthorized |
---|