From 9c8a44ca34f084c99f4c3623ad64f87741dff442 Mon Sep 17 00:00:00 2001 From: Daniel Beck Date: Tue, 18 Feb 2020 12:41:00 +0100 Subject: [PATCH] Rename to #getRequiredGlobalConfigPagePermission to disambiguate --- core/src/main/java/hudson/Functions.java | 2 +- core/src/main/java/hudson/model/Descriptor.java | 2 +- .../jenkins/model/GlobalProjectNamingStrategyConfiguration.java | 2 +- .../main/java/jenkins/model/GlobalQuietPeriodConfiguration.java | 2 +- .../java/jenkins/model/GlobalSCMRetryCountConfiguration.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/hudson/Functions.java b/core/src/main/java/hudson/Functions.java index 9e1dbe61b25b..dfbaaf79ef66 100644 --- a/core/src/main/java/hudson/Functions.java +++ b/core/src/main/java/hudson/Functions.java @@ -1062,7 +1062,7 @@ public static Collection getSortedDescriptorsForGlobalConfig(Predica Descriptor d = c.getInstance(); if (d.getGlobalConfigPage()==null) continue; - if (!Jenkins.get().hasPermission(d.getRequiredPermission())) { + if (!Jenkins.get().hasPermission(d.getRequiredGlobalConfigPagePermission())) { continue; } diff --git a/core/src/main/java/hudson/model/Descriptor.java b/core/src/main/java/hudson/model/Descriptor.java index 142934decb33..d3c230ab741a 100644 --- a/core/src/main/java/hudson/model/Descriptor.java +++ b/core/src/main/java/hudson/model/Descriptor.java @@ -841,7 +841,7 @@ public String getGlobalConfigPage() { * @since TODO */ public @Nonnull - Permission getRequiredPermission() { + Permission getRequiredGlobalConfigPagePermission() { return Jenkins.ADMINISTER; } diff --git a/core/src/main/java/jenkins/model/GlobalProjectNamingStrategyConfiguration.java b/core/src/main/java/jenkins/model/GlobalProjectNamingStrategyConfiguration.java index 0385d9dfc24a..f4af422543e7 100644 --- a/core/src/main/java/jenkins/model/GlobalProjectNamingStrategyConfiguration.java +++ b/core/src/main/java/jenkins/model/GlobalProjectNamingStrategyConfiguration.java @@ -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; } } diff --git a/core/src/main/java/jenkins/model/GlobalQuietPeriodConfiguration.java b/core/src/main/java/jenkins/model/GlobalQuietPeriodConfiguration.java index 915d04162fd2..92a463e73360 100644 --- a/core/src/main/java/jenkins/model/GlobalQuietPeriodConfiguration.java +++ b/core/src/main/java/jenkins/model/GlobalQuietPeriodConfiguration.java @@ -62,7 +62,7 @@ public boolean configure(StaplerRequest req, JSONObject json) throws FormExcepti @Nonnull @Override - public Permission getRequiredPermission() { + public Permission getRequiredGlobalConfigPagePermission() { return Jenkins.MANAGE; } } diff --git a/core/src/main/java/jenkins/model/GlobalSCMRetryCountConfiguration.java b/core/src/main/java/jenkins/model/GlobalSCMRetryCountConfiguration.java index bd2e97f677b1..3ec65ff2e3e9 100644 --- a/core/src/main/java/jenkins/model/GlobalSCMRetryCountConfiguration.java +++ b/core/src/main/java/jenkins/model/GlobalSCMRetryCountConfiguration.java @@ -59,7 +59,7 @@ public boolean configure(StaplerRequest req, JSONObject json) throws FormExcepti @Nonnull @Override - public Permission getRequiredPermission() { + public Permission getRequiredGlobalConfigPagePermission() { return Jenkins.MANAGE; } }