File tree Expand file tree Collapse file tree 2 files changed +10
-13
lines changed
resources/jenkins/security/UpdateSiteWarningsMonitor Expand file tree Collapse file tree 2 files changed +10
-13
lines changed Original file line number Diff line number Diff line change 4242import org .kohsuke .accmod .Restricted ;
4343import org .kohsuke .accmod .restrictions .NoExternalUse ;
4444import org .kohsuke .stapler .HttpResponse ;
45- import org .kohsuke .stapler .QueryParameter ;
4645import org .kohsuke .stapler .interceptor .RequirePOST ;
4746
4847/**
@@ -144,17 +143,15 @@ private Set<UpdateSite.Warning> getActiveWarnings() {
144143 * Redirects the user to the plugin manager or security configuration
145144 */
146145 @ RequirePOST
147- public HttpResponse doForward ( @ QueryParameter String fix , @ QueryParameter String configure ) {
146+ public HttpResponse doFix ( ) {
148147 Jenkins .get ().checkPermission (Jenkins .ADMINISTER );
149- if (fix != null ) {
150- return HttpResponses .redirectViaContextPath ("pluginManager" );
151- }
152- if (configure != null ) {
153- return HttpResponses .redirectViaContextPath ("configureSecurity" );
154- }
148+ return HttpResponses .redirectViaContextPath ("pluginManager" );
149+ }
155150
156- // shouldn't happen
157- return HttpResponses .redirectViaContextPath ("/" );
151+ @ RequirePOST
152+ public HttpResponse doConfigure () {
153+ Jenkins .get ().checkPermission (Jenkins .ADMINISTER );
154+ return HttpResponses .redirectViaContextPath ("configureSecurity" );
158155 }
159156
160157 /**
Original file line number Diff line number Diff line change @@ -67,11 +67,11 @@ def pluginWarnings = my.activePluginWarningsByPlugin
6767div(class : " jenkins-alert jenkins-alert-danger" , role : " alert" ) {
6868
6969 l. isAdmin() {
70- form(method : " post" , action : " ${ rootURL } / ${ my.url } /forward " ) {
70+ form(method : " post" ) {
7171 if (! pluginWarnings. isEmpty()) {
72- f. submit(name : ' fix ' , value : _(" pluginManager.link" ))
72+ f. submit(value : _(" pluginManager.link" ), action : " ${ rootURL } / ${ my.url } /fix " )
7373 }
74- f. submit(name : ' configure ' , value : _(" configureSecurity.link" ))
74+ f. submit(value : _(" configureSecurity.link" ), action : " ${ rootURL } / ${ my.url } /configure " )
7575 }
7676 }
7777
You can’t perform that action at this time.
0 commit comments