You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by al...@apache.org on 2013/01/02 19:08:19 UTC
git commit: Allow non-schema system ks modification for shuffle to
work;
patch by Jouni Hartikainen, reviewed by Aleksey Yeschenko for CASSANDRA-5097
Updated Branches:
refs/heads/cassandra-1.2 db2eccbfc -> b8d88023a
Allow non-schema system ks modification for shuffle to work;
patch by Jouni Hartikainen, reviewed by Aleksey Yeschenko for
CASSANDRA-5097
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b8d88023
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b8d88023
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b8d88023
Branch: refs/heads/cassandra-1.2
Commit: b8d88023a7e91790665c272c6b7b6cd5aa13e7e4
Parents: db2eccb
Author: Aleksey Yeschenko <al...@apache.org>
Authored: Wed Jan 2 21:06:12 2013 +0300
Committer: Aleksey Yeschenko <al...@apache.org>
Committed: Wed Jan 2 21:06:12 2013 +0300
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../org/apache/cassandra/service/ClientState.java | 6 +++---
2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/b8d88023/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index cc9b145..761b68d 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -16,6 +16,7 @@
* Log compaction merge counts (CASSANDRA-4894)
* Minimize byte array allocation by AbstractData{Input,Output} (CASSANDRA-5090)
* Add SSL support for the binary protocol (CASSANDRA-5031)
+ * Allow non-schema system ks modification for shuffle to work (CASSANDRA-5097)
1.2.0
http://git-wip-us.apache.org/repos/asf/cassandra/blob/b8d88023/src/java/org/apache/cassandra/service/ClientState.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/ClientState.java b/src/java/org/apache/cassandra/service/ClientState.java
index 06c752f..d0cf0ba 100644
--- a/src/java/org/apache/cassandra/service/ClientState.java
+++ b/src/java/org/apache/cassandra/service/ClientState.java
@@ -143,7 +143,7 @@ public class ClientState
if (internalCall)
return;
validateLogin();
- preventSystemKSSModification(keyspace, perm);
+ preventSystemKSSchemaModification(keyspace, perm);
if (perm.equals(Permission.SELECT) && READABLE_SYSTEM_RESOURCES.contains(resource))
return;
if (PROTECTED_AUTH_RESOURCES.contains(resource))
@@ -164,9 +164,9 @@ public class ClientState
resource));
}
- private void preventSystemKSSModification(String keyspace, Permission perm) throws UnauthorizedException
+ private void preventSystemKSSchemaModification(String keyspace, Permission perm) throws UnauthorizedException
{
- if (Schema.systemKeyspaceNames.contains(keyspace.toLowerCase()) && !perm.equals(Permission.SELECT))
+ if (Schema.systemKeyspaceNames.contains(keyspace.toLowerCase()) && !(perm.equals(Permission.SELECT) || perm.equals(Permission.MODIFY)))
throw new UnauthorizedException(keyspace + " keyspace is not user-modifiable.");
}