-
Notifications
You must be signed in to change notification settings - Fork 83
Show columns clarifications #1826
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -439,9 +439,25 @@ Other users' privileges cannot be listed when using a non-native auth provider. | |||
| When using the `RETURN` clause, the `YIELD` clause is mandatory and must not be omitted. | ||||
|
|
||||
| For an easy overview of the existing privileges, it is recommended to use the `AS COMMANDS` version of the `SHOW` command. | ||||
| This returns the column `command` of type `STRING` containing the privileges as the commands that are granted or denied. | ||||
| This returns two columns: | ||||
renetapopova marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||
| [options="header", width="100%", cols="2a,4,2m"] | ||||
renetapopova marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
| |=== | ||||
| | Column | ||||
| | Description | ||||
| | Type | ||||
|
|
||||
| | command | ||||
| | The privilege as the command that is granted or denied. | ||||
| Or in the `AS REVOKE COMMANDS` case, the command to revoke the privilege. label:default-output[] | ||||
| | STRING | ||||
|
|
||||
| | immutable | ||||
| | Whether or not the privilege is immutable. | ||||
| | BOOLEAN | ||||
| |=== | ||||
|
|
||||
| When omitting the `AS COMMANDS` clause, results will include multiple columns describing privileges: | ||||
| When omitting the `AS COMMANDS` clause, results will include multiple columns describing privileges instead. | ||||
renetapopova marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||
| They are all returned by default. | ||||
|
||||
| They are all returned by default. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what you mean? they are all default columns returned without a YIELD which is what this is marking. A lot of other tables like this has either another column (or two) showing if they are returned by default for the command or need a yield or they have the default label on them. But since that would be true for all rows in this table we just have this comment instead.
If this is about the column only returned by the SHOW USER PRIVILEGE versions, then it is still a default column by the definition we use it for (not requiring YIELD) it is just not available for all versions of the command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't get from the message that the default was without YIELD.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it comes from that being the language we have used throughout the admin command sections, we talk about what is returned by default and what columns you need a YIELD for 🤷
renetapopova marked this conversation as resolved.
Show resolved
Hide resolved
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -131,7 +131,7 @@ Lists the privileges granted to the specified roles. | |||||
|
|
||||||
| When using the `RETURN` clause, the `YIELD` clause is mandatory and must not be omitted. | ||||||
|
|
||||||
| For more information, see xref:authentication-authorization/manage-privileges.adoc#access-control-list-privileges[Listing privileges]. | ||||||
| The `SHOW ROLE name PRIVILEGES` command is described in xref:authentication-authorization/manage-privileges.adoc#access-control-list-privileges[Listing privileges]. | ||||||
|
|
||||||
| | Required privilege | ||||||
| a| | ||||||
|
|
@@ -340,8 +340,21 @@ For more information, see xref:authentication-authorization/dbms-administration. | |||||
|
|
||||||
|
|
||||||
| Available roles can be seen using `SHOW ROLES`. | ||||||
renetapopova marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| This returns a single column `role` of type `STRING`, containing the role name. | ||||||
|
|
||||||
| This returns a single column. | ||||||
renetapopova marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| [options="header", width="100%", cols="2a,4,2m"] | ||||||
renetapopova marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
| |=== | ||||||
| | Column | ||||||
| | Description | ||||||
| | Type | ||||||
|
|
||||||
| | role | ||||||
| | Role name | ||||||
| | STRING | ||||||
| |=== | ||||||
|
|
||||||
| .List all roles | ||||||
| ==== | ||||||
| [source, cypher, role=noplay] | ||||||
| ---- | ||||||
| SHOW ROLES | ||||||
|
|
@@ -363,6 +376,7 @@ This is the same command as `SHOW ALL ROLES`. | |||||
|
|
||||||
| 1+a|Rows: 6 | ||||||
| |=== | ||||||
| ==== | ||||||
|
|
||||||
| When first starting a Neo4j DBMS, there are a number of built-in roles: | ||||||
|
|
||||||
|
|
@@ -379,9 +393,21 @@ More information about the built-in roles and their privileges can be found in x | |||||
| There are multiple versions of this command, the default being `SHOW ALL ROLES`. | ||||||
| To only show roles that are assigned to users, the command is `SHOW POPULATED ROLES`. | ||||||
| To see which users are assigned to which roles, `WITH USERS` can be added to the command. | ||||||
| This will return an additional `STRING` column, `member`, containing the username. | ||||||
| The command produces a row per role per user and yields the following column in addition to the one output by `SHOW ROLES`: | ||||||
| [options="header", width="100%", cols="2a,4,2m"] | ||||||
renetapopova marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
| |=== | ||||||
| | Column | ||||||
| | Description | ||||||
| | Type | ||||||
|
|
||||||
| | member | ||||||
| | User name | ||||||
| | STRING | ||||||
| |=== | ||||||
| Since this gives a result with one row for each user, if a role is assigned to two users it will show up twice. | ||||||
|
||||||
| Since this gives a result with one row for each user, if a role is assigned to two users it will show up twice. | |
| Since this gives a result with one row for each user, it shows up twice if a role is assigned to two users. |
Uh oh!
There was an error while loading. Please reload this page.