Skip to content

Commit 44515fc

Browse files
committed
Update the column descriptions for SHOW ROLES
to be more visible as tables and not just part of the text, this is what most show commands does also make the examples proper examples
1 parent a809d33 commit 44515fc

File tree

1 file changed

+33
-8
lines changed

1 file changed

+33
-8
lines changed

modules/ROOT/pages/authentication-authorization/manage-roles.adoc

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ Lists the privileges granted to the specified roles.
131131

132132
When using the `RETURN` clause, the `YIELD` clause is mandatory and must not be omitted.
133133

134-
For more information, see xref:authentication-authorization/manage-privileges.adoc#access-control-list-privileges[Listing privileges].
134+
The `SHOW ROLE name PRIVILEGES` command is described in xref:authentication-authorization/manage-privileges.adoc#access-control-list-privileges[Listing privileges].
135135

136136
| Required privilege
137137
a|
@@ -340,8 +340,21 @@ For more information, see xref:authentication-authorization/dbms-administration.
340340

341341

342342
Available roles can be seen using `SHOW ROLES`.
343-
This returns a single column `role` of type `STRING`, containing the role name.
344343

344+
This returns a single column.
345+
[options="header", width="100%", cols="2a,4,2m"]
346+
|===
347+
| Column
348+
| Description
349+
| Type
350+
351+
| role
352+
| Role name
353+
| STRING
354+
|===
355+
356+
.List all roles
357+
====
345358
[source, cypher, role=noplay]
346359
----
347360
SHOW ROLES
@@ -363,6 +376,7 @@ This is the same command as `SHOW ALL ROLES`.
363376
364377
1+a|Rows: 6
365378
|===
379+
====
366380

367381
When first starting a Neo4j DBMS, there are a number of built-in roles:
368382

@@ -379,9 +393,21 @@ More information about the built-in roles and their privileges can be found in x
379393
There are multiple versions of this command, the default being `SHOW ALL ROLES`.
380394
To only show roles that are assigned to users, the command is `SHOW POPULATED ROLES`.
381395
To see which users are assigned to which roles, `WITH USERS` can be added to the command.
382-
This will return an additional `STRING` column, `member`, containing the username.
396+
The command produces a row per role per user and yields the following column in addition to the one output by `SHOW ROLES`:
397+
[options="header", width="100%", cols="2a,4,2m"]
398+
|===
399+
| Column
400+
| Description
401+
| Type
402+
403+
| member
404+
| User name
405+
| STRING
406+
|===
383407
Since this gives a result with one row for each user, if a role is assigned to two users it will show up twice.
384408

409+
.Show roles with users
410+
====
385411
[source, cypher, role=noplay]
386412
----
387413
SHOW POPULATED ROLES WITH USERS
@@ -415,9 +441,12 @@ The table of results will show information about the role and what database it b
415441
416442
2+a|Rows: 6
417443
|===
444+
====
418445

419-
It is also possible to filter and sort the results by using `YIELD`, `ORDER BY` and `WHERE`:
446+
It is also possible to filter and sort the results by using `YIELD`, `ORDER BY` and `WHERE`.
420447

448+
.Show roles with ordering and filtering
449+
====
421450
[source, cypher, role=noplay]
422451
----
423452
SHOW ROLES YIELD role
@@ -443,10 +472,6 @@ It is also possible to use `SKIP` and `LIMIT` to paginate the results.
443472
444473
1+a|Rows: 3
445474
|===
446-
447-
[NOTE]
448-
====
449-
The `SHOW ROLE name PRIVILEGES` command is found in xref:authentication-authorization/manage-privileges.adoc#access-control-list-privileges[Listing privileges].
450475
====
451476

452477

0 commit comments

Comments
 (0)