Skip to content

SHOW ROLES

The SHOW ROLES statement shows the roles that are assigned to a user account.

The return message differs according to the role of the user who is running this statement:

  • If the user is a GOD or ADMIN and is granted access to the specified graph space, Nebula Graph shows all roles in this graph space except for GOD.
  • If the user is a DBA, USER, or GUEST and is granted access to the specified graph space, Nebula Graph shows the user's own role in this graph space.
  • If the user doesn't have a role, PermissionError is returned.

For more information about user roles, see Roles and privileges.

Syntax

SHOW ROLES IN <space_name>

Example

nebula> SHOW ROLES in basketballplayer;
+---------+-----------+
| Account | Role Type |
+---------+-----------+
| "user1" | "ADMIN"   |
+---------+-----------+
Got 1 rows (time spent 789/1594 us)

Last update: April 13, 2021
Back to top