sentry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ak...@apache.org
Subject [08/13] sentry git commit: move group commands to top level.
Date Thu, 11 May 2017 06:45:13 GMT
move group commands to top level.


Project: http://git-wip-us.apache.org/repos/asf/sentry/repo
Commit: http://git-wip-us.apache.org/repos/asf/sentry/commit/2fb045c2
Tree: http://git-wip-us.apache.org/repos/asf/sentry/tree/2fb045c2
Diff: http://git-wip-us.apache.org/repos/asf/sentry/diff/2fb045c2

Branch: refs/heads/akolb-ha-cli
Commit: 2fb045c2f82920ab8438d8e646591df4aaccf7cb
Parents: b1c1cab
Author: Alexander Kolbasov <akolb@cloudera.com>
Authored: Mon Dec 12 18:36:44 2016 -0800
Committer: Alexander Kolbasov <akolb@cloudera.com>
Committed: Wed May 10 23:28:29 2017 -0700

----------------------------------------------------------------------
 .../org/apache/sentry/shell/TopLevelShell.java  | 25 ++++++++++++++++++++
 1 file changed, 25 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sentry/blob/2fb045c2/sentry-tools/src/main/java/org/apache/sentry/shell/TopLevelShell.java
----------------------------------------------------------------------
diff --git a/sentry-tools/src/main/java/org/apache/sentry/shell/TopLevelShell.java b/sentry-tools/src/main/java/org/apache/sentry/shell/TopLevelShell.java
index c1d8a77..b2b7e8d 100644
--- a/sentry-tools/src/main/java/org/apache/sentry/shell/TopLevelShell.java
+++ b/sentry-tools/src/main/java/org/apache/sentry/shell/TopLevelShell.java
@@ -77,6 +77,31 @@ public class TopLevelShell implements ShellDependent, Runnable {
         return tools.listGroupRoles();
     }
 
+    @Command(description = "Grant role to groups")
+    public void grantRole(String roleName, String ...groups) {
+        tools.grantGroupsToRole(roleName, groups);
+    }
+
+    @Command(abbrev = "grm",
+            description = "Revoke role from groups")
+    public void revokeRole(String roleName, String ...groups) {
+        tools.revokeGroupsFromRole(roleName, groups);
+    }
+
+    @Command(description = "Create Sentry role(s).")
+    public void createRole(
+            @Param(name = "roleName", description = "name of role to create")
+                    String ...roles) {
+        tools.createRoles(roles);
+    }
+
+    @Command(abbrev = "rm", description = "remove Sentry role(s).")
+    public void removeRole(
+            @Param(name = "roleName ...", description = "role names to remove")
+                    String ...roles) {
+        tools.removeRoles(roles);
+    }
+
     @Override
     public void cliSetShell(Shell theShell) {
         this.shell = theShell;


Mime
View raw message