com.atlassian.bitbucket.user.SecurityService |
Plugins may wish to perform operations as a particular user.
This interface allows plugins to perform operations as a particular user.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a custom security context that is not authenticated that can be used to perform operations.
| |||||||||||
Creates a custom security context with no difference to the current security context but allows adding further
permissions on the returned
EscalatedSecurityContext . | |||||||||||
Creates a custom security context that is authenticated as
user that can be used to perform operations. | |||||||||||
Creates a custom security context with elevated permissions that can be used to perform operations.
| |||||||||||
Creates a custom security context with elevated permissions that can be used to perform operations.
| |||||||||||
Creates a custom security context with elevated permissions that can be used to perform operations.
|
Creates a custom security context that is not authenticated that can be used to perform operations. Permissions
that have been granted to the current user will no longer apply. Note that any
escalated permissions
that are associated with the current security
context will still apply.
reason | a description of the reason for creating the custom security context. This description is used for logging. |
---|
Creates a custom security context with no difference to the current security context but allows adding further
permissions on the returned EscalatedSecurityContext
.
reason | a description of the reason for creating the custom security context. This description is used for logging. |
---|
Creates a custom security context that is authenticated as user
that can be used to perform operations.
Note that any escalated permissions
that are associated with the
current security context will still apply.
user | the user to temporarily execute as |
---|---|
reason | a description of the reason for creating the custom security context. This description is used for logging. |
Creates a custom security context with elevated permissions that can be used to perform operations. The custom context is still authenticated as the current user (if there is one). Note that any escalated permissions that are associated with the current security context will still apply.
permission | the permission to temporarily grant. This has to be a resource permission that is valid for the provided resource (e.g. REPO_READ for a Repository). |
---|---|
resource | the resource to temporarily grant the permission on |
reason | a description of the reason for creating the custom security context. This description is used for logging. |
Creates a custom security context with elevated permissions that can be used to perform operations. The custom context is still authenticated as the current user (if there is one). Note that any escalated permissions associated with the current security context will still apply.
permission | the permission to temporarily grant. This can be either a global or a resource permission. If a resource permission is provided, the permission is granted to all resources of that type. |
---|---|
reason | a description of the reason for creating the custom security context. This description is used for logging. |
Creates a custom security context with elevated permissions that can be used to perform operations. The custom
context is still authenticated as the current user (if there is one).
Note that any escalated permissions
that are associated with the
current security context will still apply.
permissions | the permissions to temporarily grant. This can be a mix of global and resource permissions. If a resource permission is provided, the permission is granted to all resources of that type. |
---|---|
reason | a description of the reason for creating the custom security context. This description is used for logging. |