mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-10 02:26:18 +00:00
[FIXED JENKINS-36494] Switch to a try with resources form of impersonation
This commit is contained in:
1 parent
f9efe65249
commit
0203504a2c
12 files changed
+299
-226
No files matched your search
@@ -24,6 +24,7 @@
|
||||
package hudson;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.NonNull;
|
||||
import hudson.security.ACLContext;
|
||||
import jenkins.util.SystemProperties;
|
||||
import hudson.PluginWrapper.Dependency;
|
||||
import hudson.init.InitMilestone;
|
||||
@@ -1352,12 +1353,9 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas
|
||||
}
|
||||
updateCenter.persistInstallStatus();
|
||||
if(!failures) {
|
||||
ACL.impersonate(currentAuth, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
InstallUtil.proceedToNextStateFrom(InstallState.INITIAL_PLUGINS_INSTALLING);
|
||||
}
|
||||
});
|
||||
try (ACLContext _ = ACL.as(currentAuth)) {
|
||||
InstallUtil.proceedToNextStateFrom(InstallState.INITIAL_PLUGINS_INSTALLING);
|
||||
}
|
||||
}
|
||||
}
|
||||
}.start();
|
||||
|
||||
Reference in new issue
Block a user