On 04/11/2013 04:34 PM, Jean Mertz wrote:
Is there any way to mark a plugin endpoint as "outside the security realm"

UnprotectedRootAction. But it does not make sense to simply make a (project) Action implement this; a URA produces its own URL hierarchy at the root of Jenkins, not inside some project. Which makes sense, because you would otherwise have to do an access check _on the project_ to see if the anonymous user could read it, before following the rest of the URL. So whereas a regular project action would be

/job/someproject/myaction

(where the Stapler framework first binds / to Jenkins, then /job/someproject to Jenkins.getJob("someproject"), and finally /job/someproject/myaction to your action, doing an access check at every step), a URA would be

/myaction

or you could add more context to the request like

/myaction/someproject

or

/myaction?someparam=someval

but then it is up to you to interpret the rest of the URL.

Also whereas an instance of a project action is associated to the project somehow—either using TransientProjectActionFactory or by permanently calling addAction—a URA is a singleton which is registered with @Extension and does not necessarily have any connection to a job (~ project) or any other object.

In short: to use URA you must refactor the affected code since the design is 
quite different.

cannot find symbol : method 
impersonate(org.acegisecurity.Authentication,org.jenkinsci.plugins.badge.StatusImage)

You need to read the Javadoc for impersonate as you are not calling it correctly. It takes just one argument, and you then run some code and have to restore the original context using a finally block.

--
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.


Reply via email to