You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Andres de la Peña (Jira)" <ji...@apache.org> on 2021/10/14 19:25:00 UTC

[jira] [Comment Edited] (CASSANDRA-17027) Allow to grant permission for all tables in a keyspace

    [ https://issues.apache.org/jira/browse/CASSANDRA-17027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17428989#comment-17428989 ] 

Andres de la Peña edited comment on CASSANDRA-17027 at 10/14/21, 7:24 PM:
--------------------------------------------------------------------------

Using {{KEYSPACE_PER_TEST}} makes the test a bit awkward because we can't use the table placeholders provided by {{CQTester}}, so we have a lot of usages of {{KEYSPACE_PER_TEST}} and {{formatQuery}}. Nothing wrong with that, but I was thinking that we could add a new [{{CQLTester#useKeyspacePerTest()}}|https://github.com/adelapena/cassandra/blob/f8086df448c1253d0c08cef0e5cf86b234379c2d/test/unit/org/apache/cassandra/cql3/CQLTester.java#L694-L697] method to make it use {{KEYSPACE_PER_TEST}} in {{formatQuery}}, {{createTable}}, etc. That way we can improve the readability of the new test, and also make some minor cosmetic improvements in other tests using {{KEYSPACE_PER_TEST}}.

I gave it a quick try [here|https://github.com/adelapena/cassandra/commit/f8086df448c1253d0c08cef0e5cf86b234379c2d], and IMO it simplifies things a bit. If you like it we can either incorporate it here or in a separate ticket, wdyt?


was (Author: adelapena):
Using {{KEYSPACE_PER_TEST}} makes the test a bit awkward because we can't use the table placeholders provided by {{CQTester}}, so we have a lot of usages of {{KEYSPACE_PER_TEST}} and {{formatQuery}}. Nothing wrong with that, but I was thinking that we could add a new {{CQLTester#useKeyspacePerTest()}} method to make it use {{KEYSPACE_PER_TEST}} in {{formatQuery}}, {{createTable}}, etc. That way we can improve the readability of the new test, and also make some minor cosmetic improvements in other tests using {{KEYSPACE_PER_TEST}}.

I gave it a quick try [here|https://github.com/adelapena/cassandra/commit/f8086df448c1253d0c08cef0e5cf86b234379c2d], and IMO it simplifies things a bit. If you like it we can either incorporate it here or in a separate ticket, wdyt?

> Allow to grant permission for all tables in a keyspace 
> -------------------------------------------------------
>
>                 Key: CASSANDRA-17027
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17027
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: CQL/Syntax, Feature/Authorization
>            Reporter: Benjamin Lerer
>            Assignee: Benjamin Lerer
>            Priority: Normal
>             Fix For: 4.x
>
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> In some scenario it is useful to prevent users to alter or drop a keyspace
> while allowing them to create new tables and user types.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org