> On 21. Dec 2017, at 13:49, Miguelangel Fernandez <[email protected]>
> wrote:
>
> How can I make the static content in my plugin accessible without
> authentication? or public?
Only specific URLs are allowed to be accessed without Overall/Read permission,
and arbitrary resource files from plugins aren't. One of the URLs that work is
/securityRealm, so the currently selected security realm is exposed, allowing
users without any permissions to interact with the security realm. That means
you can add a getter or similar with some wiring that serves your resource file
programmatically.
When put next to the views of the security realm, the following addition to
MySecurityRealm will serve the file at /securityRealm/logo
---
public void doLogo(StaplerRequest req, StaplerResponse rsp) throws IOException,
ServletException {
URL resource =
MySecurityRealm.class.getResource("MySecurityRealm/logo.png");
rsp.serveFile(req, resource);
}
---
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-dev/D0912882-63C1-4C17-92E1-B37AAAA373EF%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.