geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jinmeil...@apache.org
Subject [geode] branch develop updated: GEODE-3703: rename target permission from JAR to DEPLOY
Date Thu, 28 Sep 2017 19:47:04 GMT
This is an automated email from the ASF dual-hosted git repository.

jinmeiliao pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
     new ceec2c0  GEODE-3703: rename target permission from JAR to DEPLOY
ceec2c0 is described below

commit ceec2c0d4f524c6353dd9a79b8867b5eb2806225
Author: Jinmei Liao <jiliao@pivotal.io>
AuthorDate: Thu Sep 28 08:32:52 2017 -0700

    GEODE-3703: rename target permission from JAR to DEPLOY
---
 .../internal/cli/commands/CreateAsyncEventQueueCommand.java    |  2 +-
 .../geode/management/internal/cli/commands/DeployCommand.java  |  2 +-
 .../internal/cli/commands/DestroyFunctionCommand.java          |  2 +-
 .../management/internal/cli/commands/UndeployCommand.java      |  2 +-
 .../java/org/apache/geode/security/ResourcePermission.java     |  2 +-
 .../apache/geode/management/internal/security/TestCommand.java | 10 +++++-----
 6 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateAsyncEventQueueCommand.java
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateAsyncEventQueueCommand.java
index ba9dc94..eb89c21 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateAsyncEventQueueCommand.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/CreateAsyncEventQueueCommand.java
@@ -43,7 +43,7 @@ public class CreateAsyncEventQueueCommand implements GfshCommand {
   @CliCommand(value = CliStrings.CREATE_ASYNC_EVENT_QUEUE,
       help = CliStrings.CREATE_ASYNC_EVENT_QUEUE__HELP)
   @ResourceOperation(resource = ResourcePermission.Resource.CLUSTER,
-      operation = ResourcePermission.Operation.MANAGE, target = ResourcePermission.Target.JAR)
+      operation = ResourcePermission.Operation.MANAGE, target = ResourcePermission.Target.DEPLOY)
   public Result createAsyncEventQueue(
       @CliOption(key = CliStrings.CREATE_ASYNC_EVENT_QUEUE__ID, mandatory = true,
           help = CliStrings.CREATE_ASYNC_EVENT_QUEUE__ID__HELP) String id,
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DeployCommand.java
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DeployCommand.java
index ebbc3c3..5ee16fa 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DeployCommand.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DeployCommand.java
@@ -63,7 +63,7 @@ public class DeployCommand implements GfshCommand {
       interceptor = "org.apache.geode.management.internal.cli.commands.DeployCommand$Interceptor",
       isFileUploaded = true, relatedTopic = {CliStrings.TOPIC_GEODE_CONFIG})
   @ResourceOperation(resource = ResourcePermission.Resource.CLUSTER,
-      operation = ResourcePermission.Operation.MANAGE, target = ResourcePermission.Target.JAR)
+      operation = ResourcePermission.Operation.MANAGE, target = ResourcePermission.Target.DEPLOY)
   public Result deploy(
       @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS}, help = CliStrings.DEPLOY__GROUP__HELP,
           optionContext = ConverterHint.MEMBERGROUP) String[] groups,
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DestroyFunctionCommand.java
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DestroyFunctionCommand.java
index 37beb97..9d85957 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DestroyFunctionCommand.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/DestroyFunctionCommand.java
@@ -47,7 +47,7 @@ public class DestroyFunctionCommand implements GfshCommand {
   @CliMetaData(relatedTopic = {CliStrings.TOPIC_GEODE_FUNCTION},
       interceptor = "org.apache.geode.management.internal.cli.commands.DestroyFunctionCommand$Interceptor")
   @ResourceOperation(resource = ResourcePermission.Resource.CLUSTER,
-      operation = ResourcePermission.Operation.MANAGE, target = ResourcePermission.Target.JAR)
+      operation = ResourcePermission.Operation.MANAGE, target = ResourcePermission.Target.DEPLOY)
   // TODO: Add optioncontext for functionId
   public Result destroyFunction(
       @CliOption(key = CliStrings.DESTROY_FUNCTION__ID, mandatory = true,
diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/UndeployCommand.java
b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/UndeployCommand.java
index 5df7ac7..e0189df 100644
--- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/UndeployCommand.java
+++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/UndeployCommand.java
@@ -49,7 +49,7 @@ public class UndeployCommand implements GfshCommand {
   @CliCommand(value = {CliStrings.UNDEPLOY}, help = CliStrings.UNDEPLOY__HELP)
   @CliMetaData(relatedTopic = {CliStrings.TOPIC_GEODE_CONFIG})
   @ResourceOperation(resource = ResourcePermission.Resource.CLUSTER,
-      operation = ResourcePermission.Operation.MANAGE, target = ResourcePermission.Target.JAR)
+      operation = ResourcePermission.Operation.MANAGE, target = ResourcePermission.Target.DEPLOY)
   public Result undeploy(
       @CliOption(key = {CliStrings.GROUP, CliStrings.GROUPS},
           help = CliStrings.UNDEPLOY__GROUP__HELP,
diff --git a/geode-core/src/main/java/org/apache/geode/security/ResourcePermission.java b/geode-core/src/main/java/org/apache/geode/security/ResourcePermission.java
index 9671c13..e7d111e 100644
--- a/geode-core/src/main/java/org/apache/geode/security/ResourcePermission.java
+++ b/geode-core/src/main/java/org/apache/geode/security/ResourcePermission.java
@@ -40,7 +40,7 @@ public class ResourcePermission extends WildcardPermission {
 
   // when ALL is specified, we need it to convert to string "*" instead of "ALL".
   public enum Target {
-    ALL(ResourcePermission.ALL), DISK, GATEWAY, QUERY, JAR;
+    ALL(ResourcePermission.ALL), DISK, GATEWAY, QUERY, DEPLOY;
 
     private String name;
 
diff --git a/geode-core/src/test/java/org/apache/geode/management/internal/security/TestCommand.java
b/geode-core/src/test/java/org/apache/geode/management/internal/security/TestCommand.java
index 55708c2..0fc858e 100644
--- a/geode-core/src/test/java/org/apache/geode/management/internal/security/TestCommand.java
+++ b/geode-core/src/test/java/org/apache/geode/management/internal/security/TestCommand.java
@@ -49,8 +49,8 @@ public class TestCommand {
       new ResourcePermission(Resource.CLUSTER, Operation.MANAGE, Target.DISK);
   public static ResourcePermission clusterManageGateway =
       new ResourcePermission(Resource.CLUSTER, Operation.MANAGE, Target.GATEWAY);
-  public static ResourcePermission clusterManageJar =
-      new ResourcePermission(Resource.CLUSTER, Operation.MANAGE, Target.JAR);
+  public static ResourcePermission clusterManageDeploy =
+      new ResourcePermission(Resource.CLUSTER, Operation.MANAGE, Target.DEPLOY);
   public static ResourcePermission clusterManageQuery =
       new ResourcePermission(Resource.CLUSTER, Operation.MANAGE, Target.QUERY);
 
@@ -145,7 +145,7 @@ public class TestCommand {
     // createTestCommand("deploy --jar=group1_functions.jar --group=Group1",
     // ResourcePermissions.DATA_MANAGE); // TODO:
     // this command will fail in GfshCommandsSecurityTest at interceptor for jar file checking
-    createTestCommand("undeploy --group=Group1", clusterManageJar);
+    createTestCommand("undeploy --group=Group1", clusterManageDeploy);
 
     // Diskstore Commands
     createTestCommand("backup disk-store --dir=foo", ResourcePermissions.DATA_READ,
@@ -234,10 +234,10 @@ public class TestCommand {
 
     // Queue Commands
     createTestCommand("create async-event-queue --id=myAEQ --listener=myApp.myListener",
-        clusterManageJar);
+        clusterManageDeploy);
     createTestCommand(
         "create async-event-queue --id=myAEQ --listener=myApp.myListener --persistent",
-        clusterManageJar, clusterWriteDisk);
+        clusterManageDeploy, clusterWriteDisk);
 
     createTestCommand("list async-event-queues", ResourcePermissions.CLUSTER_READ);
 

-- 
To stop receiving notification emails like this one, please contact
['"commits@geode.apache.org" <commits@geode.apache.org>'].

Mime
View raw message