Skip to content

Commit

Permalink
Rename to #getRequiredGlobalConfigPagePermission to disambiguate
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-beck committed Feb 18, 2020
1 parent 735193c commit 9c8a44c
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/Functions.java
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,7 @@ public static Collection<Descriptor> getSortedDescriptorsForGlobalConfig(Predica
Descriptor d = c.getInstance();
if (d.getGlobalConfigPage()==null) continue;

if (!Jenkins.get().hasPermission(d.getRequiredPermission())) {
if (!Jenkins.get().hasPermission(d.getRequiredGlobalConfigPagePermission())) {
continue;
}

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/model/Descriptor.java
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ public String getGlobalConfigPage() {
* @since TODO
*/
public @Nonnull
Permission getRequiredPermission() {
Permission getRequiredGlobalConfigPagePermission() {
return Jenkins.ADMINISTER;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public boolean configure(StaplerRequest req, JSONObject json) throws hudson.mode

@Nonnull
@Override
public Permission getRequiredPermission() {
public Permission getRequiredGlobalConfigPagePermission() {
return Jenkins.MANAGE;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public boolean configure(StaplerRequest req, JSONObject json) throws FormExcepti

@Nonnull
@Override
public Permission getRequiredPermission() {
public Permission getRequiredGlobalConfigPagePermission() {
return Jenkins.MANAGE;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public boolean configure(StaplerRequest req, JSONObject json) throws FormExcepti

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

0 comments on commit 9c8a44c

Please sign in to comment.