Skip to content

Commit 9cb6f2c

Browse files
Apply suggestions from code review
Co-authored-by: Reneta Popova <[email protected]>
1 parent ea1b714 commit 9cb6f2c

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

modules/ROOT/pages/authentication-authorization/property-based-access-control.adoc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ CREATE ROLE regularUsers;
1212
[[property-based-access-control]]
1313
= Property-based access control
1414

15-
In Neo4j, you can grant read privileges based on properties of nodes.
15+
Property-based access control grants permissions to users to read node properties based on property/value conditions.
16+
Each property-based privilege can only be restricted by a single property.
17+
For information about read privileges and syntax, see xref:authentication-authorization/privileges-reads.adoc[Read privileges].
1618

1719
[IMPORTANT]
1820
====
@@ -23,7 +25,6 @@ Users who can change this property can affect the granted property-based privile
2325

2426
== Syntax
2527

26-
For information about read privileges and syntax, see xref:authentication-authorization/privileges-reads.adoc[Read privileges].
2728

2829
To specify the property/value conditions of the read privilege, you can use the following `pattern` syntax:
2930

@@ -68,7 +69,7 @@ The user role does not need to have `READ` privilege for the property used by th
6869

6970
=== Grant a property-based privilege on a specific property using its value
7071

71-
The following code shows how to grant permission to `READ` the `address` property on `Email` or `Website` nodes with domain `exampledomain.com` to role `regularUsers`.
72+
The following example shows how to grant permission to `READ` the `address` property on `Email` or `Website` nodes with domain `exampledomain.com` to role `regularUsers`:
7273

7374
[source, syntax, role="noheader"]
7475
----
@@ -85,7 +86,7 @@ GRANT READ { address } ON GRAPH * FOR (:Email|Website {domain: 'exampledomain.co
8586

8687
=== Grant a property-based privilege using `NULL`
8788

88-
If you want to grant permission to `TRAVERSE` nodes with label `Email` where property `classification` is `NULL` to role `regularUsers`, use the following command:
89+
The following example shows how to grant permission to `TRAVERSE` nodes with the label `Email` where property `classification` is `NULL` to role `regularUsers`:
8990

9091
[source, syntax, role="noheader"]
9192
----
@@ -94,7 +95,7 @@ GRANT TRAVERSE ON GRAPH * FOR (n:Email) WHERE n.classification IS NULL TO regula
9495

9596
=== Deny a property-based privilege using a comparison operator
9697

97-
To deny permission to `READ` and `TRAVERSE` nodes where the property `classification` is different from `UNCLASSIFIED` to role `regularUsers`, use the code below:
98+
The following example shows how to deny permission to `READ` and `TRAVERSE` nodes where the property `classification` is different from `UNCLASSIFIED` to role `regularUsers`:
9899

99100
[source, syntax, role="noheader"]
100101
----
@@ -103,8 +104,7 @@ DENY MATCH {*} ON GRAPH * FOR (n) WHERE n.classification <> 'UNCLASSIFIED' TO re
103104

104105
=== Grant a property-based privilege on all properties using a property value
105106

106-
Imagine you need to grant permission to `READ` all properties on nodes where the property `securityLevel` is higher than `3` to role `regularUsers`.
107-
The following example shows how to do that.
107+
The following example shows how to grant permission to `READ` all properties on nodes where the property `securityLevel` is higher than `3` to role `regularUsers`:
108108

109109
[source, syntax, role="noheader"]
110110
----
@@ -118,7 +118,7 @@ The role `regularUsers` does not need to have `READ` privilege for the property
118118

119119
=== Deny a property-based privilege using a list of values
120120

121-
The following code shows how to deny permission to `READ` all properties on nodes where the property `classification` is not included in the list of `[UNCLASSIFIED, PUBLIC]`.
121+
The following example shows how to deny permission to `READ` all properties on nodes where the property `classification` is not included in the list of `[UNCLASSIFIED, PUBLIC]`:
122122

123123
[source, syntax, role="noheader"]
124124
----
@@ -129,7 +129,7 @@ DENY READ {*} ON GRAPH * FOR (n) WHERE NOT n.classification IN ['UNCLASSIFIED',
129129

130130
=== Grant a property-based privilege using temporal value
131131

132-
Granting permission to `READ` all properties on nodes where the property `createdAt` is later than the current date
132+
The following example shows how to grant permission to `READ` all properties on nodes where the property `createdAt` is later than the current date:
133133

134134
[source, syntax, role="noheader"]
135135
----
@@ -148,7 +148,7 @@ This is essential when revoking property-based privileges containing evaluated f
148148
Not all temporal values are comparable, see link:{neo4j-docs-base-uri}/cypher-manual/current/syntax/operators/#cypher-ordering[Cypher Manual -> Syntax -> Operators -> Ordering and comparison of values].
149149
====
150150

151-
Show the privilege created by the command in the previous example as a revoke command
151+
You can show the privilege created by the command in the previous example as a revoke command by running:
152152

153153
[source, syntax, role="noheader"]
154154
----

0 commit comments

Comments
 (0)