On 04/12/2013 01:02 AM, Jean Mertz wrote:
I could either use a block or two arguments
Recent versions of Jenkins support passing a Runnable block, which is not what your initial attempt was. But for compatibility with versions in common use you probably
cannot use this overload yet. Anyway it is not suitable for a block which needs to return a value, as yours does.
The second style I implemented like this:
SecurityContext securityContext = ACL.impersonate(ACL.SYSTEM);
try {
return factory.getImage(project.getIconColor());
}finally {
SecurityContextHolder.setContext(securityContext);
}
Looks right.
cannot find symbol
symbol : method impersonate(org.acegisecurity.Authentication)
Problem in your development environment perhaps? Lots of code uses this idiom,
as you can find by searching.
--
You received this message because you are subscribed to the Google Groups "Jenkins
Developers" 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.