You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by te...@apache.org on 2014/02/27 04:30:10 UTC

svn commit: r1572421 - /hbase/trunk/hbase-shell/src/main/ruby/hbase/security.rb

Author: tedyu
Date: Thu Feb 27 03:30:10 2014
New Revision: 1572421

URL: http://svn.apache.org/r1572421
Log:
HBASE-10621 Unable to grant user permission to namespace


Modified:
    hbase/trunk/hbase-shell/src/main/ruby/hbase/security.rb

Modified: hbase/trunk/hbase-shell/src/main/ruby/hbase/security.rb
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-shell/src/main/ruby/hbase/security.rb?rev=1572421&r1=1572420&r2=1572421&view=diff
==============================================================================
--- hbase/trunk/hbase-shell/src/main/ruby/hbase/security.rb (original)
+++ hbase/trunk/hbase-shell/src/main/ruby/hbase/security.rb Thu Feb 27 03:30:10 2014
@@ -60,10 +60,9 @@ module Hbase
             namespace_name = table_name[1...table_name.length]
             raise(ArgumentError, "Can't find a namespace: #{namespace_name}") unless namespace_exists?(namespace_name)
 
-            #We pass the namespace name along with "@" so that we can differentiate a namespace from a table.
             # invoke cp endpoint to perform access controlse
             org.apache.hadoop.hbase.protobuf.ProtobufUtil.grant(
-              protocol, user, tablebytes, perm.getActions())
+              protocol, user, namespace_name, perm.getActions())
           else
             # Table should exist
             raise(ArgumentError, "Can't find a table: #{table_name}") unless exists?(table_name)
@@ -116,11 +115,10 @@ module Hbase
             namespace_name = table_name[1...table_name.length]
             raise(ArgumentError, "Can't find a namespace: #{namespace_name}") unless namespace_exists?(namespace_name)
 
-            #We pass the namespace name along with "@" so that we can differentiate a namespace from a table.
             tablebytes=table_name.to_java_bytes
             # invoke cp endpoint to perform access controlse
             org.apache.hadoop.hbase.protobuf.ProtobufUtil.revoke(
-              protocol, user, tablebytes)
+              protocol, user, namespace_name)
           else
              # Table should exist
              raise(ArgumentError, "Can't find a table: #{table_name}") unless exists?(table_name)