ekaterinadimitrova2 commented on a change in pull request #1263:
URL: https://github.com/apache/cassandra/pull/1263#discussion_r727423903



##########
File path: NEWS.txt
##########
@@ -38,6 +38,8 @@ using the provided 'sstableupgrade' tool.
 
 New features
 ------------
+    - A new ALL TABLES IN KEYSPACE resource has been added. It allows to grant 
permission for all tables and user types
+      in a keyspace while preventing the user to use those permission on the 
keyspace itself.

Review comment:
       ```suggestion
       - A new ALL TABLES IN KEYSPACE resource has been added. It allows to 
grant permissions for all tables and user types
         in a keyspace while preventing the user to use those permissions on 
the keyspace itself.
   ```

##########
File path: pylib/cqlshlib/test/test_cqlsh_completion.py
##########
@@ -826,3 +826,67 @@ def test_complete_in_alter_keyspace(self):
         self.trycompletions('ALTER KEYSPACE system_trac', "es WITH replication 
= {'class': '")
         self.trycompletions("ALTER KEYSPACE system_traces WITH replication = 
{'class': '", '',
                             choices=['NetworkTopologyStrategy', 
'SimpleStrategy'])
+
+    def test_complete_in_grant(self):
+        self.trycompletions(
+            "GR",
+            immediate='ANT ')

Review comment:
       ```suggestion
           self.trycompletions("GR",
                                             immediate='ANT ')
   ```
   I would probably keep the formatting for this and all following invocations 
similar to the one used in the other tests in the same class. 

##########
File path: test/unit/org/apache/cassandra/auth/GrantAndRevokeTest.java
##########
@@ -0,0 +1,222 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cassandra.auth;
+
+import org.junit.After;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import org.apache.cassandra.config.DatabaseDescriptor;
+import org.apache.cassandra.cql3.CQLTester;
+
+public class GrantAndRevokeTest extends CQLTester
+{
+    private static final String user = "user";
+    private static final String pass = "12345";
+
+    @BeforeClass
+    public static void setUpClass()
+    {
+        DatabaseDescriptor.setPermissionsValidity(-1);

Review comment:
       I am not sure, didn't you mean it to be 0 actually for disable? 

##########
File path: test/unit/org/apache/cassandra/auth/GrantAndRevokeTest.java
##########
@@ -0,0 +1,222 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cassandra.auth;
+
+import org.junit.After;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import org.apache.cassandra.config.DatabaseDescriptor;
+import org.apache.cassandra.cql3.CQLTester;
+
+public class GrantAndRevokeTest extends CQLTester

Review comment:
       Maybe we can add before the class 
`@SuppressWarnings("SingleCharacterStringConcatenation")` to remove the noise 
from the warnings? 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to