LIST PERMISSIONS
List the permissions, filtered by either resource and/or role.
When using this command, you can omit the ON clause to display all related resources or omit the OF clause to display all role permissions.
A role must have the DESCRIBE permission on the target resources and roles to list their permissions.
Only superusers can list all permissions.
Synopsis
LIST ( ALL PERMISSIONS | <permission_list> )[ ON <resource_name> ]
[ OF <role_name> ][ NORECURSIVE ] ;
| 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
- role_name
-
Selects a role. If the role name has capital letters or special characters enclose it in single quotes.
- NORECURSIVE
-
Only display permissions granted to the role. By default permissions checks are recursive, and show direct and inherited permissions.
List output
List permissions for a role named role1:
LIST ALL PERMISSION OF role1;
The output includes all permissions for the specified role, along with details about the resource, whether the permission is granted, restricted, or grantable:
role | username | resource | permission | granted | restricted | grantable
-------+----------+--------------------+------------+---------+------------+-----------
role1 | role1 | <keyspace cycling> | DROP | False | True | True
role1 | role1 | <keyspace cycling> | AUTHORIZE | True | True | False
role2 | role2 | <keyspace cycling> | CREATE | True | False | False
role3 | role3 | <keyspace cycling> | DROP | False | False | True
role3 | role3 | <keyspace cycling> | UPDATE | True | False | False
(5 rows)
| Column | Description |
|---|---|
|
The name of the role that the permission was granted or authorized on. |
|
If the role is associated with a legacy user account the user name displays, else the role name displays. |
|
The resource name in angle brackets. |
|
The name of the permission.
When For details about permissions, see the Access control matrix tables. |
|
|
|
|
|
|
Example
- All permissions for all roles and resources
-
List permissions given to all the roles on all resources:
LIST ALL PERMISSIONS; - Individual role permissions
-
List all permissions given to
sam:LIST ALL PERMISSIONS OF sam;role | username | resource | permission ------+----------+-------------------------------+------------ sam | sam | <table cycling.birthday_list> | AUTHORIZE (1 rows) - All permissions on a resource
-
List all permissions on the
cyclist_nametable:LIST ALL PERMISSIONS ON cycling.cyclist_name OF team_manager;role | username | resource | permission | granted | restricted | grantable --------------+--------------+-----------------+------------+---------+------------+----------- sys_admin | sys_admin | <all keyspaces> | AUTHORIZE | True | False | False team_manager | team_manager | <all keyspaces> | SELECT | True | False | False (2 rows)