Skip to content

Commit 9734157

Browse files
committed
Address review comments
1 parent 933e045 commit 9734157

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

modules/ROOT/pages/security/authorization.adoc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,7 @@ type Post @authorization(filter: [
244244
In each ruleset (`filter` and `validate`), rules are joined with an `OR`.
245245
The two rulesets are joined with an `AND`.
246246

247-
For example: `(filterRule1 OR filterRule2) AND (validateRule1 OR validateRule2)`.
248-
249-
If ever there are two rules which you would like to be combined with an `AND`, these should be combined into a single rule. Take for instance the following example:
247+
For example, the following would allow for the update of a `User` node if the JWT roles claim includes `admin` _or_ if the `locked` property on the node is `false`:
250248

251249
[source, graphql, indent=0]
252250
----

modules/ROOT/pages/security/subscriptions-authorization.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
= Subscriptions authorization
44

55
Subscriptions require their own authorization rules, which are configured with the `@subscriptionsAuthorization` directive.
6-
These rules are different to authorization rules for queries and mutations because they use filtering rules available for subscriptions events. These filtering rules can only be used to filter against the properties of the nodes impacted by the events - they cannot be used to arbitarily filter across related nodes as in the schema generated by the Neo4j GraphQL Library normally.
6+
These rules are different to authorization rules for queries and mutations because they use filtering rules available for subscriptions events.
7+
These filtering rules can only be used to filter against the properties of the nodes impacted by the events.
78

89
All subscriptions authorization rules have an implied requirement for authentication, given that the rules are normally evaluated against values in the JWT payload.
910

0 commit comments

Comments
 (0)