public interface ImpersonationService
Modifier and Type | Method and Description |
---|---|
<V> Callable<V> |
runAsUser(String username,
Callable<V> delegate)
Delegates the given callable so that it can run in the context of the given user.
|
void |
runWith(org.acegisecurity.Authentication authentication,
BambooRunnables.NotThrowing notThrowing)
Runs a given Bamboo runnable with supplied Authentication.
|
<V> Callable<V> |
runWithAuthenticationImpersonation(org.acegisecurity.Authentication authentication,
Callable<V> delegate)
Deprecated.
since 5.4 use @{link ImpersonationHelper} instead
|
<V> Callable<V> |
runWithOptionalUserImpersonation(String username,
Callable<V> delegate)
Delegates the given runnable so that it can run in the context of the given user.
|
@NotNull <V> Callable<V> runAsUser(@NotNull String username, @NotNull Callable<V> delegate)
username
- username to set the authentication context to.delegate
- callable to execute in the new contextIllegalArgumentException
- if username is invalidIllegalStateException
- if it fails to set up the authentication correctly.@NotNull <V> Callable<V> runWithOptionalUserImpersonation(@Nullable String username, @NotNull Callable<V> delegate)
username
- (optional) to set the authentication context todelegate
- callable to execute in the new context@NotNull @Deprecated <V> Callable<V> runWithAuthenticationImpersonation(@NotNull org.acegisecurity.Authentication authentication, @NotNull Callable<V> delegate)
authentication
- to set the authentication context todelegate
- callable to execute in the new contextvoid runWith(@NotNull org.acegisecurity.Authentication authentication, @NotNull BambooRunnables.NotThrowing notThrowing)
Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.