Return-Path: X-Original-To: apmail-hbase-commits-archive@www.apache.org Delivered-To: apmail-hbase-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 884DA17310 for ; Thu, 2 Apr 2015 21:14:38 +0000 (UTC) Received: (qmail 45427 invoked by uid 500); 2 Apr 2015 21:14:38 -0000 Delivered-To: apmail-hbase-commits-archive@hbase.apache.org Received: (qmail 45245 invoked by uid 500); 2 Apr 2015 21:14:38 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 45062 invoked by uid 99); 2 Apr 2015 21:14:38 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Apr 2015 21:14:38 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 0F423E2F5A; Thu, 2 Apr 2015 21:14:38 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: apurtell@apache.org To: commits@hbase.apache.org Date: Thu, 02 Apr 2015 21:14:39 -0000 Message-Id: In-Reply-To: <867aae1428084fbab030305cc10de886@git.apache.org> References: <867aae1428084fbab030305cc10de886@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/3] hbase git commit: HBASE-11386 Backport HBASE-12601 to all active branches other than master HBASE-11386 Backport HBASE-12601 to all active branches other than master Signed-off-by: Andrew Purtell Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/27ec6bc8 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/27ec6bc8 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/27ec6bc8 Branch: refs/heads/0.98 Commit: 27ec6bc888843343cd5924be301cd87607c1ced7 Parents: b881aed Author: Ashish Singhi Authored: Thu Apr 2 10:37:02 2015 +0530 Committer: Andrew Purtell Committed: Thu Apr 2 14:14:04 2015 -0700 ---------------------------------------------------------------------- hbase-shell/src/main/ruby/shell/commands/grant.rb | 5 ++++- hbase-shell/src/main/ruby/shell/commands/revoke.rb | 9 ++++++++- hbase-shell/src/main/ruby/shell/commands/user_permission.rb | 4 ++++ 3 files changed, 16 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/27ec6bc8/hbase-shell/src/main/ruby/shell/commands/grant.rb ---------------------------------------------------------------------- diff --git a/hbase-shell/src/main/ruby/shell/commands/grant.rb b/hbase-shell/src/main/ruby/shell/commands/grant.rb index 0e8a65c..4a995ff 100644 --- a/hbase-shell/src/main/ruby/shell/commands/grant.rb +++ b/hbase-shell/src/main/ruby/shell/commands/grant.rb @@ -27,11 +27,14 @@ Syntax : grant [<@namespace> [ [ [ grant 'bobsmith', 'RWXCA' + hbase> grant '@admins', 'RWXCA' hbase> grant 'bobsmith', 'RWXCA', '@ns1' hbase> grant 'bobsmith', 'RW', 't1', 'f1', 'col1' hbase> grant 'bobsmith', 'RW', 'ns1:t1', 'f1', 'col1' http://git-wip-us.apache.org/repos/asf/hbase/blob/27ec6bc8/hbase-shell/src/main/ruby/shell/commands/revoke.rb ---------------------------------------------------------------------- diff --git a/hbase-shell/src/main/ruby/shell/commands/revoke.rb b/hbase-shell/src/main/ruby/shell/commands/revoke.rb index 57a2530..768989b 100644 --- a/hbase-shell/src/main/ruby/shell/commands/revoke.rb +++ b/hbase-shell/src/main/ruby/shell/commands/revoke.rb @@ -22,10 +22,17 @@ module Shell def help return <<-EOF Revoke a user's access rights. -Syntax : revoke [
[ []] +Syntax : revoke [<@namespace> [
[ []]]] + +Note: Groups and users access are revoked in the same way, but groups are prefixed with an '@' + character. In the same way, tables and namespaces are specified, but namespaces are + prefixed with an '@' character. + For example: hbase> revoke 'bobsmith' + hbase> revoke '@admins' + hbase> revoke 'bobsmith', '@ns1' hbase> revoke 'bobsmith', 't1', 'f1', 'col1' hbase> revoke 'bobsmith', 'ns1:t1', 'f1', 'col1' EOF http://git-wip-us.apache.org/repos/asf/hbase/blob/27ec6bc8/hbase-shell/src/main/ruby/shell/commands/user_permission.rb ---------------------------------------------------------------------- diff --git a/hbase-shell/src/main/ruby/shell/commands/user_permission.rb b/hbase-shell/src/main/ruby/shell/commands/user_permission.rb index 5d8bf8a..e4673fc 100644 --- a/hbase-shell/src/main/ruby/shell/commands/user_permission.rb +++ b/hbase-shell/src/main/ruby/shell/commands/user_permission.rb @@ -23,9 +23,13 @@ module Shell return <<-EOF Show all permissions for the particular user. Syntax : user_permission
+ +Note: A namespace must always precede with '@' character. + For example: hbase> user_permission + hbase> user_permission '@ns1' hbase> user_permission 'table1' hbase> user_permission 'namespace1:table1' hbase> user_permission '.*'