Skip to content

Commit

Permalink
Indicate which plugin provides an UnprotectedRootAction
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-beck committed Apr 18, 2020
1 parent c0ce2c1 commit d786396
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 36 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package hudson.security.LegacySecurityRealm

import hudson.PluginWrapper
import hudson.model.UnprotectedRootAction
import jenkins.model.Jenkins

def f = namespace(lib.FormTagLib)

f.entry(title: _('Unprotected URLs')) {
p(_('blurb'))
ul {
for (def action : Jenkins.get().getActions().sort { x, y -> x.getUrlName() <=> y.getUrlName() }) {
if (action instanceof UnprotectedRootAction) {
li {
a(href: '../' + action.getUrlName(), target: '_blank') {
code {
text(action.getUrlName())
}
}
br()
PluginWrapper whichPlugin = Jenkins.get().getPluginManager().whichPlugin(action.getClass())
if (whichPlugin == null) {
text(_("byCore"))
} else {
raw(_("byPlugin", whichPlugin.getDisplayName(), whichPlugin.getUrl()))
}
}
}
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@
blurb=\
These URLs (and URLs starting with these prefixes plus a /) should require no authentication. \
If possible, configure your container to pass these requests straight to Jenkins without requiring login.
byCore=(provided by Jenkins core)
byPlugin=(provided by <a href="{1}" target="_blank">{0}</a>)

0 comments on commit d786396

Please sign in to comment.