ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sevdoki...@apache.org
Subject [17/50] [abbrv] incubator-ignite git commit: #ignite-961-master: add security check for rest create and destroy cache.
Date Tue, 28 Jul 2015 11:20:42 GMT
#ignite-961-master: add security check for rest create and destroy cache.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/9dd00aca
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/9dd00aca
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/9dd00aca

Branch: refs/heads/ignite-1121
Commit: 9dd00aca14f38a43ebdc7d6651e5830c6c2f5b6b
Parents: cdf8da8
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Thu Jul 23 16:04:39 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Thu Jul 23 16:04:39 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/processors/rest/GridRestProcessor.java  | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9dd00aca/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestProcessor.java
index 4549db0..bb796d2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestProcessor.java
@@ -581,6 +581,13 @@ public class GridRestProcessor extends GridProcessorAdapter {
 
                 break;
 
+            case GET_OR_CREATE_CACHE:
+            case DESTROY_CACHE:
+                perm = SecurityPermission.ADMIN_CACHE;
+                name = ((GridRestCacheRequest)req).cacheName();
+
+                break;
+
             case CACHE_METRICS:
             case CACHE_SIZE:
             case TOPOLOGY:
@@ -592,8 +599,6 @@ public class GridRestProcessor extends GridProcessorAdapter {
             case ATOMIC_DECREMENT:
             case NAME:
             case LOG:
-            case GET_OR_CREATE_CACHE:
-            case DESTROY_CACHE:
                 break;
 
             default:


Mime
View raw message