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, NebulaGraph 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, NebulaGraph shows the user's own role in this graph space.
  • If the user does not have access to the specified graph space, NebulaGraph returns PermissionError.

For more information about roles, see Roles and privileges.

Syntax

SHOW ROLES IN <space_name>;

Example

nebula> SHOW ROLES in basketballplayer;
+---------+-----------+
| Account | Role Type |
+---------+-----------+
| "user1" | "ADMIN"   |
+---------+-----------+

Last update: March 13, 2023
Back to top