REVOKE ROLE
Removes the privileges of one role from another role. The role that is being revoked must have been granted to the role by another role. Privilege removal is immediate, even to active client sessions.
See REVOKE PERMISSION to revoke permission to resources from a role.
Syntax
REVOKE <role_name> FROM <role_name> ;
| Syntax conventions | Description |
|---|---|
UPPERCASE |
Literal keyword. |
Lowercase |
Not literal. |
|
Variable value. Replace with a user-defined value. |
|
Optional.
Square brackets ( |
|
Group.
Parentheses ( |
|
Or.
A vertical bar ( |
|
Repeatable.
An ellipsis ( |
|
Single quotation ( |
|
Map collection.
Braces ( |
Set, list, map, or tuple.
Angle brackets ( |
|
|
End CQL statement.
A semicolon ( |
|
Separate the command line options from the command arguments with two hyphens ( |
|
Search CQL only: Single quotation marks ( |
|
Search CQL only: Identify the entity and literal value to overwrite the XML element in the schema and solrConfig files. |
Parameters
| Parameter | Description | Default |
|---|---|---|
|
Identifier of the role. CQL forces all names to lowercase. If you need to preserve case or use special characters in the role name, enclose <role_name> in quotes. |
Example
Manage permissions using GRANT and REVOKE.
|
A role can only modify permissions of another role and can only modify ( |
-
Revoke permissions to perform queries and modify data in the
cyclingkeyspace from thecoachrole:REVOKE cycling_admin FROM coach; -
View the
coachrole’s permissions to verify that this role no longer has thecycling_adminpermissions:LIST ALL PERMISSIONS OF coach;Because of inheritance in this example, the user can perform
SELECTqueries on the table if one of these conditions is met:-
The user is a superuser.
-
The user has
SELECTonALL KEYSPACESpermissions. -
The user has
SELECTon the cycling keyspace.
-
-
Revoke permissions to perform
ALTERcommands in thecyclingkeyspace from thecoachrole:REVOKE ALTER ON KEYSPACE cycling FROM coach;