Skip to content

Commit 4cd57ec

Browse files
committed
Clarify dimension use with wildcards
1 parent 65a6116 commit 4cd57ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Read on to [Dimensions](#dimensions) to learn how to constraint the wildcard to
129129
Each rule in the rule set should include the same number of conditions in them. In the following example there are 3 conditions in each rule.
130130

131131
```js
132-
recht.rules = [
132+
recht.rules = [
133133
['ALLOW', 'Gold member', ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'], ['Swimming pool', 'Gym', 'Sauna']],
134134
['DENY', 'Guest', ['Mon', 'Tue'], 'Sauna'],
135135
['ALLOW', ['Guest', 'Regular member'], '*', '*']
@@ -152,7 +152,7 @@ recht.dimensions = [memberships, days, facilities]
152152
recht.check('Guest', 'Sat') // false, since Sat isn't included in the days dimension
153153
```
154154

155-
The first check passes, because initially we haven't defined the dimensions. As we define the dimensions, the second check fails because `Sat` is not an element in the `days` dimension.
155+
The first check passes, because initially we haven't defined the dimensions and the rules accept a wildcard for days. As we define the dimensions, the second check fails because `Sat` is not an element in the `days` dimension.
156156

157157
```js
158158
recht.dimensions = [memberships, facilities, days]

0 commit comments

Comments
 (0)