13
13
import hudson .model .Saveable ;
14
14
import hudson .model .TaskListener ;
15
15
import hudson .model .labels .LabelAtom ;
16
+ import hudson .security .Permission ;
16
17
import hudson .slaves .NodeProperty ;
17
18
import hudson .util .FormApply ;
18
19
import hudson .util .XStream2 ;
@@ -646,7 +647,7 @@ public void addEnvVars(List<TemplateEnvVar> envVars) {
646
647
@ POST
647
648
public HttpResponse doDoDelete (@ AncestorInPath PodTemplateGroup owner ) throws IOException {
648
649
Jenkins j = Jenkins .get ();
649
- j .checkPermission (Jenkins .ADMINISTER );
650
+ j .checkPermission (Jenkins .MANAGE );
650
651
if (owner == null ) {
651
652
throw new IllegalStateException ("Cloud could not be found" );
652
653
}
@@ -660,7 +661,7 @@ public HttpResponse doDoDelete(@AncestorInPath PodTemplateGroup owner) throws IO
660
661
public HttpResponse doConfigSubmit (StaplerRequest req , @ AncestorInPath PodTemplateGroup owner )
661
662
throws IOException , ServletException , Descriptor .FormException {
662
663
Jenkins j = Jenkins .get ();
663
- j .checkPermission (Jenkins .ADMINISTER );
664
+ j .checkPermission (Jenkins .MANAGE );
664
665
if (owner == null ) {
665
666
throw new IllegalStateException ("Cloud could not be found" );
666
667
}
@@ -1055,6 +1056,11 @@ public static class DescriptorImpl extends Descriptor<PodTemplate> {
1055
1056
"activeDeadlineSeconds" , "idleMinutes" , "instanceCap" , "slaveConnectTimeout" ,
1056
1057
};
1057
1058
1059
+ @ NonNull
1060
+ public Permission getRequiredGlobalConfigPagePermission () {
1061
+ return Jenkins .MANAGE ;
1062
+ }
1063
+
1058
1064
public DescriptorImpl () {
1059
1065
for (String field : STRING_FIELDS ) {
1060
1066
addHelpFileRedirect (field + "Str" , PodTemplate .class , field );
0 commit comments