提交 1ca16318 编写于 作者: S sogabe

Fixed compilation failure

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@25520 71c3de6d-444a-0410-be80-ed276b4c234a
上级 a3008af7
......@@ -38,6 +38,7 @@ import hudson.lifecycle.Lifecycle;
import hudson.model.UpdateSite.Data;
import hudson.model.UpdateSite.Plugin;
import hudson.model.listeners.SaveableListener;
import hudson.security.ACL;
import hudson.util.DaemonThreadFactory;
import hudson.util.IOException2;
import hudson.util.PersistedList;
......@@ -70,6 +71,7 @@ import java.util.concurrent.ThreadFactory;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.acegisecurity.context.SecurityContextHolder;
/**
* Controls update center capability.
......@@ -811,12 +813,13 @@ public class UpdateCenter extends AbstractModelObject implements Saveable {
// if this is a bundled plugin, make sure it won't get overwritten
PluginWrapper pw = plugin.getInstalled();
if (pw!=null && pw.isBundled()) try {
SecurityContextHolder.getContext().setAuthentication(ACL.SYSTEM);
pw.doPin();
} finally {
SecurityContextHolder.clearContext();
}
if (pw!=null && pw.isBundled())
try {
SecurityContextHolder.getContext().setAuthentication(ACL.SYSTEM);
pw.doPin();
} finally {
SecurityContextHolder.clearContext();
}
}
protected void onSuccess() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册