Change By: Jesse Glick (08/Apr/13 2:24 PM)
Description: Initially suggested by jglick when I asked a question on the developer group  https://groups.google.com/forum/?fromgroups=#!topic/jenkinsci-dev/H8gAZcDOqgc -

Creates a delegating
 {{  ExecutorService }}  implementation whose submit and related methods capture the current  {{  SecurityContext }}  
and then wrap the task in a block that resets the context afterwards. Using this one could simply write: 

{code}
SomeUtilityClass.wrapExecutorWithSecurity(service).submit(new Callable<Void>() { 
     public Void call() throws Exception { 
         Jenkins.getInstance().getItem(whatever); // should work 
         return null; 
     } 
});
   
{code}
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply via email to