mirror of https://github.com/apache/cassandra
CASSANDRA-18868 Added documentation of granting permissions for all tables in a keyspace
This commit is contained in:
parent
1f9ac53b75
commit
f79e8b3a0d
|
|
@ -0,0 +1,2 @@
|
|||
grant_permission_statement ::= GRANT permission ON ALL TABLES IN KEYSPACE keyspace_name TO user_name;
|
||||
permission ::= CREATE | ALTER | DROP | SELECT | MODIFY | AUTHORIZE | UNMASK | SELECT_MASKED
|
||||
|
|
@ -0,0 +1 @@
|
|||
GRANT ALTER ON ALL TABLES IN KEYSPACE keyspace_name TO user_name;
|
||||
|
|
@ -0,0 +1 @@
|
|||
GRANT DROP ON ALL TABLES IN KEYSPACE keyspace_name TO user_name;
|
||||
|
|
@ -0,0 +1 @@
|
|||
GRANT MODIFY ON ALL TABLES IN KEYSPACE keyspace_name TO user_name;
|
||||
|
|
@ -634,6 +634,42 @@ include::cassandra:example$CQL/grant_describe.cql[]
|
|||
This grants any user with the `role_admin` role permission to view any
|
||||
and all roles in the system with a `LIST ROLES` statement.
|
||||
|
||||
==== GRANT PERMISSION FOR ALL TABLES IN A KEYSPACE
|
||||
|
||||
Granting permission to all tables and user types in a keyspace uses
|
||||
`GRANT <permission-name>` statement:
|
||||
|
||||
[source,bnf]
|
||||
----
|
||||
include::example$BNF/grant_permission_all_tables_statement.bnf[]
|
||||
----
|
||||
|
||||
For example:
|
||||
|
||||
[source,cql]
|
||||
----
|
||||
include::example$CQL/grant_drop_all_tables.cql[]
|
||||
----
|
||||
|
||||
This command grants any user with the `user_name` role permission to execute
|
||||
`DROP` statements on all the tables across the keyspace `keyspace_name`
|
||||
|
||||
[source,cql]
|
||||
----
|
||||
include::example$CQL/grant_alter_all_tables.cql[]
|
||||
----
|
||||
|
||||
This command grants any user with the `user_name` role permission to execute
|
||||
`ALTER` statements on all the tables across the keyspace `keyspace_name`
|
||||
|
||||
[source,cql]
|
||||
----
|
||||
include::example$CQL/grant_modify_all_tables.cql[]
|
||||
----
|
||||
|
||||
This command grants any user with the `user_name` role permission to execute
|
||||
`MODIFY` statements on all the tables across the keyspace `keyspace_name`
|
||||
|
||||
==== GRANT ALL
|
||||
|
||||
When the `GRANT ALL` form is used, the appropriate set of permissions is
|
||||
|
|
|
|||
Loading…
Reference in New Issue