Skip to content

Commit

Permalink
[JENKINS-73276] do not allow user without admin permission to save em…
Browse files Browse the repository at this point in the history
…pty form (#1572)
  • Loading branch information
Pldi23 authored Jun 10, 2024
1 parent 4fbb009 commit f5b83f1
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,16 @@ public static boolean isAllowed(KubernetesSlave agent, Job job) {

@Override
public AbstractFolderProperty<?> reconfigure(StaplerRequest req, JSONObject form) throws FormException {
if (form == null) {
return null;
}

// ignore modifications silently and return the unmodified object if the user
// does not have the ADMINISTER Permission
if (!userHasAdministerPermission()) {
return this;
}

if (form == null) {
return null;
}

// Backwards compatibility: this method was expecting a set of entries PREFIX_USAGE_PERMISSION+cloudName -->
// true | false
// Now we're getting a set of permitted cloud names inside permittedClouds entry
Expand Down

0 comments on commit f5b83f1

Please sign in to comment.