Issue Type: Improvement Improvement
Assignee: Patrick McKeown
Components: security
Created: 08/Apr/13 2:43 AM
Description:

Initially suggested by jglick when I asked about this on the developer group https://groups.google.com/forum/?fromgroups=#!topic/jenkinsci-dev/H8gAZcDOqgc -

The cleaner way to do this would probably be to create a delegating ExecutorService implementation whose submit and related methods capture the current SecurityContext
and then wrap the task in a block like the above. Then you could simply write:

SomeUtilityClass.wrapExecutorWithSecurity(service).submit(new Callable<Void>() {
public Void call() throws Exception { Jenkins.getInstance().getItem(whatever); // should work return null; }
});

Such a wrapper would be a welcome addition to Jenkins core, I think. Use the jenkins.security package if you want to play with a pull request, or it could be added to
hudson.security.ACL which already hosts the impersonate methods.

Project: Jenkins
Labels: security
Priority: Minor Minor
Reporter: Patrick McKeown
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