Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecirioli committed Jan 3, 2025
1 parent d3e8908 commit b5b2f3f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import hudson.DescriptorExtensionList;
import hudson.model.Descriptor;
import hudson.security.Permission;

/**
* {@link Descriptor} for {@link BuildDiscarder}.
Expand All @@ -22,4 +23,10 @@ protected BuildDiscarderDescriptor() {
public static DescriptorExtensionList<BuildDiscarder, BuildDiscarderDescriptor> all() {
return Jenkins.get().getDescriptorList(BuildDiscarder.class);
}

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

}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

import hudson.Extension;
import hudson.ExtensionList;
import hudson.security.Permission;
import hudson.util.DescribableList;
import java.io.IOException;
import java.util.List;
Expand Down Expand Up @@ -64,6 +65,11 @@ public DescribableList<GlobalBuildDiscarderStrategy, GlobalBuildDiscarderStrateg
return configuredBuildDiscarders;
}

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

@Override
public boolean configure(StaplerRequest2 req, JSONObject json) throws FormException {
try {
Expand Down

0 comments on commit b5b2f3f

Please sign in to comment.