From 9a98bb4ce9d3e600a2b982995914222c305ebe8a Mon Sep 17 00:00:00 2001 From: Josh Elser Date: Wed, 3 Jan 2018 16:57:12 -0500 Subject: [PATCH] HBASE-19691 Removes Global(A) requirement for getClusterStatus Signed-off-by: Chia-Ping Tsai --- .../org/apache/hadoop/hbase/security/access/AccessController.java | 6 ------ .../apache/hadoop/hbase/security/access/TestAccessController.java | 4 ++-- src/main/asciidoc/_chapters/appendix_acl_matrix.adoc | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java index 4e1924fefa..4110dfddd1 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessController.java @@ -2751,12 +2751,6 @@ public class AccessController implements MasterCoprocessor, RegionCoprocessor, checkLockPermissions(getActiveUser(ctx), null, tableName, null, description); } - @Override - public void preGetClusterStatus(final ObserverContext ctx) - throws IOException { - requirePermission(getActiveUser(ctx), "getClusterStatus", Action.ADMIN); - } - private void checkLockPermissions(User user, String namespace, TableName tableName, RegionInfo[] regionInfos, String reason) throws IOException { diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java index f181747d0b..83a6dfd90f 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java @@ -3134,7 +3134,7 @@ public class TestAccessController extends SecureTestUtil { } }; - verifyAllowed(action, SUPERUSER, USER_ADMIN); - verifyDenied(action, USER_CREATE, USER_RW, USER_RO, USER_NONE, USER_OWNER); + verifyAllowed( + action, SUPERUSER, USER_ADMIN, USER_CREATE, USER_RW, USER_RO, USER_NONE, USER_OWNER); } } diff --git a/src/main/asciidoc/_chapters/appendix_acl_matrix.adoc b/src/main/asciidoc/_chapters/appendix_acl_matrix.adoc index 0c99b1f361..83043f71ce 100644 --- a/src/main/asciidoc/_chapters/appendix_acl_matrix.adoc +++ b/src/main/asciidoc/_chapters/appendix_acl_matrix.adoc @@ -123,7 +123,7 @@ In case the table goes out of date, the unit tests which check for accuracy of p | | getReplicationPeerConfig | superuser\|global(A) | | updateReplicationPeerConfig | superuser\|global(A) | | listReplicationPeers | superuser\|global(A) -| | getClusterStatus | superuser\|global(A) +| | getClusterStatus | any user | Region | openRegion | superuser\|global(A) | | closeRegion | superuser\|global(A) | | flush | superuser\|global(A)\|global\(C)\|TableOwner\|table(A)\|table\(C) -- 2.11.4.GIT