Overview
A role aggregates multiple privileges and other roles. Effective role design and usage enable role-based access control.
A role is also called a policy in Ultipa.
Showing Roles
To list all roles of the database:
SHOW ROLE
It returns a table _policy
with the following fields:
Field |
Description |
---|---|
name |
Role name. |
graphPrivileges |
Graph privileges included in the role. |
systemPrivileges |
System privileges included in the role. |
propertyPrivileges |
Property privileges included in the role. |
policies |
Other roles included in the role. |
Creating a Role
The CREATE ROLE
statement creates a role for the database.
To create a role named sales
:
CREATE ROLE sales
Granting privileges and roles to a role is not yet supported.
Renaming a Role
You can rename a role using the ALTER ROLE
statement.
To rename the role sales
to manager
:
ALTER ROLE sales RENAME TO manager
Dropping a Role
You can drop a role using the DROP ROLE
statement.
To drop the role manager
:
DROP ROLE manager