Skip to content

Commit

Permalink
[JENKINS-73086] Allow users with Overall/Manage permission to configu…
Browse files Browse the repository at this point in the history
…re global default folder settings (#395)
  • Loading branch information
jtnord authored May 1, 2024
2 parents bee0d4b + 520c028 commit 7fa03bf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
<jenkins.version>2.454</jenkins.version>
<no-test-jar>false</no-test-jar>
<hpi.compatibleSinceVersion>5.2</hpi.compatibleSinceVersion>
<useBeta>true</useBeta> <!-- needed for Jenkins.MANAGE support -->
</properties>

<licenses>
<license>
<name>MIT</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
import hudson.Extension;
import hudson.init.InitMilestone;
import hudson.init.Initializer;
import hudson.security.Permission;
import hudson.util.DescribableList;
import jenkins.model.GlobalConfiguration;
import jenkins.model.Jenkins;
import net.sf.json.JSONObject;
import org.jenkinsci.Symbol;
import org.kohsuke.stapler.DataBoundConstructor;
Expand All @@ -23,6 +25,13 @@ public class AbstractFolderConfiguration extends GlobalConfiguration {

private List<FolderHealthMetric> healthMetrics;


@NonNull
@Override
public Permission getRequiredGlobalConfigPagePermission() {
return Jenkins.MANAGE;
}

@NonNull
public static AbstractFolderConfiguration get() {
AbstractFolderConfiguration instance = GlobalConfiguration.all().get(AbstractFolderConfiguration.class);
Expand Down

0 comments on commit 7fa03bf

Please sign in to comment.