Skip to content
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

Add 00N70 to the notification code CommandHasNoEffect #161

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
128 changes: 81 additions & 47 deletions modules/ROOT/pages/notifications/all-notifications.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2081,7 +2081,7 @@ Security notifications indicate that the result of the query or command might ha
Verify that this is the intended behavior of your query or command.

[#_neo_clientnotification_security_commandhasnoeffect]
=== CommandHasNoEffect
=== Role or privilege not assigned

.Notification details
[cols="<1s,<4"]
Expand All @@ -2092,9 +2092,7 @@ m|Neo.ClientNotification.Security.CommandHasNoEffect
a|`<command>` has no effect.*
|Descriptions
a|
- The user already has the role. See Status Codes documentation for more information.
- The user does not have the role. See Status Codes documentation for more information.
- The role already has the privilege. See Status Codes documentation for more information.
- The role does not have the privilege. See Status Codes documentation for more information.
|Category
m|SECURITY
Expand All @@ -2112,51 +2110,51 @@ m|INFORMATION

*_``<command>`` and `cmd` could be either the full command given by the user or a subset of the given command._

.Granting a role to a user who already has that role

.Revoking a role from a user who does not have that role
[.tabbed-example]
=====
[.include-with-neo4j-code]
======
Command::
+
[source,cypher]
[source, cypher]
----
GRANT ROLE admin TO john
REVOKE ROLE admin, reader FROM jane
----

Title of the returned code::
`GRANT ROLE admin TO john` has no effect.
`REVOKE ROLE reader FROM jane` has no effect.

Description of the returned code::
The user already has the role. See Status Codes documentation for more information.
The user does not have the role. See Status Codes documentation for more information.

Suggestions for improvement::
Verify that this is the intended role and user.

======
[.include-with-GQLSTATUS-code]
======
Command::
+
[source,cypher]
[source, cypher]
----
GRANT ROLE admin TO john
REVOKE ROLE admin, reader FROM jane
----

Returned GQLSTATUS code::
00N71

Returned status description::
note: successful completion - role or privilege not assigned.
`GRANT ROLE admin TO john` has no effect.
`REVOKE ROLE reader FROM jane` has no effect.
The role or privilege is not assigned.

Suggestions for improvement::
Verify that this is the intended role and user.

======
=====

.Revoking a role from a user who does not have that role
.Revoking a privilege from a role that does not have that privilege
[.tabbed-example]
=====
[.include-with-neo4j-code]
Expand All @@ -2165,86 +2163,121 @@ Command::
+
[source, cypher]
----
REVOKE ROLE admin, reader FROM jane
REVOKE WRITE ON GRAPH * FROM reader
----

Title of the returned code::
`REVOKE ROLE reader FROM jane` has no effect.
`REVOKE DENY WRITE ON GRAPH * FROM reader` has no effect.

Description of the returned code::
The user does not have the role. See Status Codes documentation for more information.
The role does not have the privilege. See Status Codes documentation for more information.

Suggestions for improvement::
Verify that this is the intended role and user.
Verify that this is the intended privilege and role.
======
[.include-with-GQLSTATUS-code]
======

Command::
+
[source, cypher]
----
REVOKE ROLE admin, reader FROM jane
REVOKE WRITE ON GRAPH * FROM reader
----

Returned GQLSTATUS code::
00N71

Returned status description::
note: successful completion - role or privilege not assigned.
`REVOKE ROLE reader FROM jane` has no effect.
`REVOKE DENY WRITE ON GRAPH * FROM reader` has no effect.
The role or privilege is not assigned.

Suggestions for improvement::
Verify that this is the intended role and user.
Verify that this is the intended privilege and role.

======
=====

.Granting or denying a privilege to a role that already has that privilege
// This command returns 2 notifications, one for NODES and one for RELATIONSHIPS.

[#_neo_clientnotification_security_roleorprivilegealreadyassigned]
=== Role or privilege already assigned

.Notification details
[cols="<1s,<4"]
|===
|Neo4j code
m|Neo.ClientNotification.Security.CommandHasNoEffect
|Title
a|`<command>` has no effect.*
|Descriptions
a|
- The user already has the role. See Status Codes documentation for more information.
- The role already has the privilege. See Status Codes documentation for more information.
|Category
m|SECURITY
|GQLSTATUS code
m|00N70
|Status description
|note: successful completion - role or privilege already assigned.
`$cmd` has no effect.
The role or privilege is already assigned.
|Classification
m|SECURITY
|SeverityLevel
m|INFORMATION
|===

*_``<command>`` and `cmd` could be either the full command given by the user or a subset of the given command._


.Granting a role to a user who already has that role
[.tabbed-example]
=====
[.include-with-neo4j-code]
======
Command::
+
[source, cypher]
[source,cypher]
----
GRANT TRAVERSE ON GRAPH * TO reader
GRANT ROLE admin TO john
----

Title of the returned code::
`GRANT TRAVERSE ON GRAPH * NODE * TO reader` has no effect.
`GRANT ROLE admin TO john` has no effect.

Description of the returned code::
The role already has the privilege. See Status Codes documentation for more information.
The user already has the role. See Status Codes documentation for more information.

Suggestions for improvement::
Verify that this is the intended privilege and role.
Verify that this is the intended role and user.

======
[.include-with-GQLSTATUS-code]
======
Command::
+
[source, cypher]
[source,cypher]
----
GRANT TRAVERSE ON GRAPH * TO reader
GRANT ROLE admin TO john
----

Returned GQLSTATUS code::
00N71
00N70

Returned status description::
note: successful completion - role or privilege not assigned.
`GRANT TRAVERSE ON GRAPH * TO reader` has no effect.
The role or privilege is not assigned.
note: successful completion - role or privilege already assigned.
`GRANT ROLE admin TO john` has no effect.
The role or privilege is already assigned.

Suggestions for improvement::
Verify that this is the intended privilege and role.
Verify that this is the intended role and user.

======
=====

.Revoking a privilege from a role that does not have that privilege

.Granting or denying a privilege to a role that already has that privilege
// This command returns 2 notifications, one for NODES and one for RELATIONSHIPS.
[.tabbed-example]
=====
[.include-with-neo4j-code]
Expand All @@ -2253,42 +2286,43 @@ Command::
+
[source, cypher]
----
REVOKE WRITE ON GRAPH * FROM reader
GRANT TRAVERSE ON GRAPH * TO reader
----

Title of the returned code::
`REVOKE DENY WRITE ON GRAPH * FROM reader` has no effect.
`GRANT TRAVERSE ON GRAPH * NODE * TO reader` has no effect.

Description of the returned code::
The role does not have the privilege. See Status Codes documentation for more information.
The role already has the privilege. See Status Codes documentation for more information.

Suggestions for improvement::
Verify that this is the intended privilege and role.

======
[.include-with-GQLSTATUS-code]
======

Command::
+
[source, cypher]
----
REVOKE WRITE ON GRAPH * FROM reader
GRANT TRAVERSE ON GRAPH * TO reader
----

Returned GQLSTATUS code::
00N71
00N70

Returned status description::
note: successful completion - role or privilege not assigned.
`REVOKE DENY WRITE ON GRAPH * FROM reader` has no effect.
The role or privilege is not assigned.
note: successful completion - role or privilege already assigned.
`GRANT TRAVERSE ON GRAPH * TO reader` has no effect.
The role or privilege is already assigned.

Suggestions for improvement::
Verify that this is the intended privilege and role.

======
=====



[#_neo_clientnotification_security_impossiblerevokecommand]
=== Impossible revoke command

Expand Down