Skip to content

Commit

Permalink
PR(DOCS): Update Examples
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzadlone committed Oct 24, 2024
1 parent 4239918 commit af1b6dc
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 9 deletions.
19 changes: 16 additions & 3 deletions examples/dpi_policy/user_dpi_policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@
"users": {
"permissions": {
"read": {
"expr": "owner + reader"
"expr": "owner + reader + updater + deleter"
},
"write": {
"expr": "owner"
"update": {
"expr": "owner + updater"
}
"delete": {
"expr": "owner + deleter"
}
},
"relations": {
Expand All @@ -25,6 +28,16 @@
"actor"
]
}
"updater": {
"types": [
"actor"
]
}
"deleter": {
"types": [
"actor"
]
}
}
}
}
Expand Down
14 changes: 11 additions & 3 deletions examples/dpi_policy/user_dpi_policy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ resources:
users:
permissions:
read:
expr: owner + reader
write:
expr: owner
expr: owner + reader + updater + deleter
update:
expr: owner + updater
delete:
expr: owner + deleter

relations:
owner:
Expand All @@ -29,3 +31,9 @@ resources:
reader:
types:
- actor
updater:
types:
- actor
deleter:
types:
- actor
17 changes: 14 additions & 3 deletions examples/dpi_policy/user_dpi_policy_with_manages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@ resources:
users:
permissions:
read:
expr: owner + reader + writer
expr: owner + reader + updater + deleter + writer

write:
expr: owner + writer
update:
expr: owner + updater

delete:
expr: owner + deleter

nothing:
expr: dummy
Expand All @@ -34,6 +37,14 @@ resources:
types:
- actor

updater:
types:
- actor

deleter:
types:
- actor

writer:
types:
- actor
Expand Down

0 comments on commit af1b6dc

Please sign in to comment.