Skip to content

Commit c0700fa

Browse files
committed
remove over explanation
1 parent 4f37cca commit c0700fa

2 files changed

Lines changed: 1 addition & 28 deletions

File tree

docs/keto/guides/strict-mode.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Strict mode improves both performance and correctness:
3030
Ory Network enforces fixed depth and width limits that cannot be changed in the console. If you hit a limit, contact
3131
[Ory support](https://www.ory.com/support) to discuss your use case.
3232

33-
## Known breaking patterns
33+
## Patterns that break in strict mode
3434

3535
These patterns work in non-strict mode but break after enabling strict mode.
3636

docs/keto/reference/ory-permission-language.mdx

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,6 @@ class File implements Namespace {
9696

9797
`this.related.x.traverse(g => ...)` iterates over the objects in relation `x` and evaluates the inner expression for each one.
9898

99-
**Check via a relation on the related object:**
100-
10199
```ts
102100
class Group implements Namespace {
103101
related: {
@@ -117,31 +115,6 @@ class File implements Namespace {
117115

118116
`view` is granted if the subject is a member of any group in `viewerGroups`.
119117

120-
**Check via a permission on the related object:**
121-
122-
```ts
123-
class Group implements Namespace {
124-
related: {
125-
members: User[]
126-
}
127-
permits = {
128-
isMember: (ctx: Context) => this.related.members.includes(ctx.subject),
129-
}
130-
}
131-
132-
class File implements Namespace {
133-
related: {
134-
viewerGroups: Group[]
135-
}
136-
permits = {
137-
view: (ctx: Context) => this.related.viewerGroups.traverse((g) => g.permits.isMember(ctx)),
138-
}
139-
}
140-
```
141-
142-
Same result, but delegating to a named permission on `Group` instead of accessing the relation directly. Use this when the
143-
permission logic on the related namespace is more complex than a single `includes` check.
144-
145118
### Boolean operators
146119

147120
Combine checks with `||`, `&&`, and `!`:

0 commit comments

Comments
 (0)