| com.atlassian.bitbucket.user.EscalatedSecurityContext | 
Custom security context that specifies as what user and with which additional permissions an Operation should be called.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Escalates the security context as the specified user and added permissions for the duration of the current request. | |||||||||||
| Executes an Operation as the specified user and added permissions. | |||||||||||
| Adds permissions to the set of elevated permissions. | |||||||||||
| Adds permissions on a particular resource to the set of elevated permissions. | |||||||||||
| Adds permissions to the set of elevated permissions. | |||||||||||
Escalates the security context as the specified user and added permissions for the duration of the current request. If there is no request in scope an exception is thrown.
| IllegalStateException | if there is no requestin scope for the current thread | 
|---|
Executes an Operation as the specified user and added permissions. The current security context is restored after the operation completes.
Note: Nesting invocations merges all elevated permissions rather than replacing the previous values.
| operation | the operation to be executed | 
|---|
| when the provided operation throws an exception | |
| Throwable | 
Adds permissions to the set of elevated permissions. If a resource permission (e.g. REPO_READ) is provided, the permission is granted to all resources.
| permission | the permission to be temporarily granted | 
|---|
Adds permissions on a particular resource to the set of elevated permissions.
| resource | the resource | 
|---|---|
| permission | the permission to be temporarily granted on the provided resource | 
Adds permissions to the set of elevated permissions. If a resource permission (e.g. REPO_READ) is provided, the permission is granted to all resources.
| permissions | the permissions to be temporarily granted | 
|---|