| java.lang.Object | |
| ↳ | com.atlassian.bitbucket.rest.util.RestPermissionUtils |
Utilities for parsing permissions from REST requests.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
A variant of
parsePermission(I18nService, String, Class, Permission, String) that assumes the
defaultPermission and context to be null. | |||||||||||
Parse permission coming from a REST request parameter into a Stash
Permission, optionally accepting
only permissions of given type and providing a default permission
should the one coming from the request be not specified. | |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
A variant of parsePermission(I18nService, String, Class, Permission, String) that assumes the
defaultPermission and context to be null.
| i18nService | to produce i18n-ed error messages |
|---|---|
| permission | string permission from the request to parse, may be null |
| resourceType | resource type that the permission should be related too. If this argument is not null, the parsed permission has to be related to this resource type |
permission was a null or an empty
stringParse permission coming from a REST request parameter into a Stash Permission, optionally accepting
only permissions of given type and providing a default permission
should the one coming from the request be not specified.
| i18nService | to produce i18n-ed error messages |
|---|---|
| permission | string permission from the request to parse, may be null |
| resourceType | resource type that the permission should be related too. If this argument is not null, the parsed permission has to be related to this resource type |
| defaultPermission | the default permission to use in case permission is null. May be
null itself |
| context | context for the error message |
defaultPermission, if permission was a null or an empty
string| WebApplicationException | with an appropriate error (400) and message in case the provided permission
string is invalid - either does not match an existing Stash Permission, or the matching
permission is not related to resourceType
|
|---|