You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2012/06/21 00:33:46 UTC

svn commit: r1352356 - /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java

Author: apurtell
Date: Wed Jun 20 22:33:46 2012
New Revision: 1352356

URL: http://svn.apache.org/viewvc?rev=1352356&view=rev
Log:
HBASE-6238. Grant on META not taking effect (Laxman)

Modified:
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java?rev=1352356&r1=1352355&r2=1352356&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java (original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessControlLists.java Wed Jun 20 22:33:46 2012
@@ -397,21 +397,12 @@ public class AccessControlLists {
    * used for storage.
    * </p>
    */
-  static ListMultimap<String,TablePermission> getTablePermissions(
-      Configuration conf, byte[] tableName)
-  throws IOException {
+  static ListMultimap<String, TablePermission> getTablePermissions(Configuration conf,
+      byte[] tableName) throws IOException {
     if (tableName == null) tableName = ACL_TABLE_NAME;
 
-    /* TODO: -ROOT- and .META. cannot easily be handled because they must be
-     * online before _acl_ table.  Can anything be done here?
-     */
-    if (Bytes.equals(tableName, HConstants.ROOT_TABLE_NAME) ||
-        Bytes.equals(tableName, HConstants.META_TABLE_NAME)) {
-      return ArrayListMultimap.create(0,0);
-    }
-
     // for normal user tables, we just read the table row from _acl_
-    ListMultimap<String,TablePermission> perms = ArrayListMultimap.create();
+    ListMultimap<String, TablePermission> perms = ArrayListMultimap.create();
     HTable acls = null;
     try {
       acls = new HTable(conf, ACL_TABLE_NAME);
@@ -421,8 +412,8 @@ public class AccessControlLists {
       if (!row.isEmpty()) {
         perms = parseTablePermissions(tableName, row);
       } else {
-        LOG.info("No permissions found in "+ACL_TABLE_NAME_STR+
-            " for table "+Bytes.toString(tableName));
+        LOG.info("No permissions found in " + ACL_TABLE_NAME_STR + " for table "
+            + Bytes.toString(tableName));
       }
     } finally {
       if (acls != null) acls.close();