From f73f51d2b448a22b29edbe2729cbcb3bfe1248c1 Mon Sep 17 00:00:00 2001 From: mindless Date: Wed, 11 Nov 2009 20:16:27 +0000 Subject: [PATCH] Fix so disabled permissions are not shown in project-specific permission matrix (EXTENDED_READ has been exposed there since 1.325 even w/o Extended-Read plugin to enable that permission) git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@23659 71c3de6d-444a-0410-be80-ed276b4c234a --- .../java/hudson/security/AuthorizationMatrixProperty.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/hudson/security/AuthorizationMatrixProperty.java b/core/src/main/java/hudson/security/AuthorizationMatrixProperty.java index 1a02083c32..ee2b41b8db 100644 --- a/core/src/main/java/hudson/security/AuthorizationMatrixProperty.java +++ b/core/src/main/java/hudson/security/AuthorizationMatrixProperty.java @@ -133,7 +133,7 @@ public class AuthorizationMatrixProperty extends JobProperty> { } @Extension - public static class DescriptorImpl extends JobPropertyDescriptor { + public static class DescriptorImpl extends JobPropertyDescriptor { @Override public JobProperty newInstance(StaplerRequest req, JSONObject formData) throws FormException { formData = formData.getJSONObject("useProjectSecurity"); @@ -172,7 +172,7 @@ public class AuthorizationMatrixProperty extends JobProperty> { } public boolean showPermission(Permission p) { - return p!=Item.CREATE; + return p.getEnabled() && p!=Item.CREATE; } public FormValidation doCheckName(@AncestorInPath Job project, @QueryParameter String value) throws IOException, ServletException { -- GitLab