Skip to content

Commit

Permalink
Add assertions requested in PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
pkulik0 committed Jun 20, 2024
1 parent 3e74ba0 commit a0b7f63
Showing 1 changed file with 39 additions and 2 deletions.
41 changes: 39 additions & 2 deletions openfga/tests.fga.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,21 @@ tuples:
- user: user:*
relation: administrator
object: controller:co-2
- user: user:co-2
relation: audit_log_viewer
object: controller:co-1
- user: user:co-3
relation: member
object: group:co-1
- user: group:co-1#member
relation: administrator
object: controller:co-2
- user: user:co-2
- user: user:co-4
relation: member
object: group:co-2
- user: group:co-2#member
relation: audit_log_viewer
object: controller:co-1
object: controller:co-2

# Model
- user: user:mo-1
Expand All @@ -53,6 +62,12 @@ tuples:
- user: user:mo-4
relation: reader
object: model:mo-1
- user: user:mo-5
relation: member
object: group:mo-3
- user: group:mo-3#member
relation: writer
object: model:mo-1

# Cloud
- user: user:cl-1
Expand Down Expand Up @@ -145,6 +160,17 @@ tests:
- controller:co-2
audit_log_viewer:
- controller:co-2
- user: user:co-3
type: controller
assertions:
administrator:
- controller:co-2
- user: user:co-4
type: controller
assertions:
audit_log_viewer:
- controller:co-2

check:
- user: user:co-2
object: controller:co-1
Expand Down Expand Up @@ -196,6 +222,17 @@ tests:
reader:
- model:mo-1
- model:mo-2
- user: user:mo-5
type: model
assertions:
administrator:
- model:mo-2
writer:
- model:mo-1
- model:mo-2
reader:
- model:mo-1
- model:mo-2
check:
- user: group:mo-2#member
object: model:mo-1
Expand Down

0 comments on commit a0b7f63

Please sign in to comment.