mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-14 04:22:16 +00:00
Better Javadoc for new impersonate overload.
This commit is contained in:
1 parent
ee13a9a930
commit
b486e46c4e
1 file changed
+3
-2
@@ -27,6 +27,7 @@ import javax.annotation.Nonnull;
|
||||
import hudson.remoting.Callable;
|
||||
import jenkins.security.NonSerializableSecurityContext;
|
||||
import jenkins.model.Jenkins;
|
||||
import jenkins.security.NotReallyRoleSensitiveCallable;
|
||||
import org.acegisecurity.AccessDeniedException;
|
||||
import org.acegisecurity.Authentication;
|
||||
import org.acegisecurity.context.SecurityContext;
|
||||
@@ -150,8 +151,8 @@ public abstract class ACL {
|
||||
/**
|
||||
* Safer variant of {@link #impersonate(Authentication)} that does not require a finally-block.
|
||||
* @param auth authentication, such as {@link #SYSTEM}
|
||||
* @param body an action to run with this alternate authentication in effect
|
||||
* @since TODO
|
||||
* @param body an action to run with this alternate authentication in effect (try {@link NotReallyRoleSensitiveCallable})
|
||||
* @since 1.587
|
||||
*/
|
||||
public static <V,T extends Exception> V impersonate(Authentication auth, Callable<V,T> body) throws T {
|
||||
SecurityContext old = impersonate(auth);
|
||||
|
||||
Reference in new issue
Block a user