You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/getting-started/modeling.mdx
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -254,6 +254,8 @@ Using the `action` or `permission` keywords yields the same authorization logic.
254
254
255
255
The `and` operator intersects the resolved user sets of its operands.
256
256
257
+
The same traversal rule applies to both `relation.userset` and `relation.permission`. If a relation points to multiple entities, Permify evaluates the referenced relation or permission across all related entities.
258
+
257
259
For an expression such as `org.member and org.admin`, Permify evaluates `org.member` and `org.admin` independently across all organizations reachable through `org`, and then intersects the resulting user sets.
258
260
259
261
Use this pattern when you want intersection across the users reachable through all related organizations:
Copy file name to clipboardExpand all lines: docs/use-cases/abac.mdx
+23-11Lines changed: 23 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -334,7 +334,7 @@ Both of these conditions need to be true for the **`withdraw`** permission to be
334
334
335
335
In this model:
336
336
337
-
1.**`employee`**: Represents an individual worker. It has no specific attributes or relations in this case.
337
+
1.**`employee`**: Represents the subject type used in the permission check. In this example, the permission logic does not depend on employee relations, so any employee subject would receive the same result.
338
338
2.**`organization`**: Represents an entire organization, which has a **`founding_year`** attribute. The **`view`** permission is granted if the **`check_founding_year`** rule (which checks if the organization was founded after 2000) returns true.
339
339
3.**`department`**: Represents a department within the organization. It has a **`budget`** attribute and a relation to its parent **`organization`**. The **`view`** permission is granted if the department's budget is more than 10,000 (checked by the **`check_budget`** rule) and if the **`organization.view`** permission is true.
If a department is related to multiple organizations, `organization.view` is evaluated across all related organizations. For example, if `department:1` is related to both `organization:1` and `organization:2`, and only one of them passes `view`, the traversal still succeeds because `relation.permission` uses union semantics across the related entities.
0 commit comments