mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-17 22:12:25 +00:00
[FIXED HUDSON-3653] Fixed in 1.305
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@18068 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
fc13fdab1b
commit
ea0ed93558
1 file changed
+5
@@ -2,12 +2,15 @@ package hudson.model;
|
||||
|
||||
import hudson.util.StreamTaskListener;
|
||||
import hudson.util.NullStream;
|
||||
import hudson.security.ACL;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.acegisecurity.context.SecurityContextHolder;
|
||||
|
||||
/**
|
||||
* {@link PeriodicWork} that takes a long time to run.
|
||||
*
|
||||
@@ -46,6 +49,8 @@ public abstract class AsyncPeriodicWork extends PeriodicWork {
|
||||
|
||||
StreamTaskListener l = createListener();
|
||||
try {
|
||||
SecurityContextHolder.getContext().setAuthentication(ACL.SYSTEM);
|
||||
|
||||
execute(l);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace(l.fatalError(e.getMessage()));
|
||||
|
||||
Reference in new issue
Block a user