feat: add supertokens
This commit is contained in:
33
modules/workspace/cerbos/policies/workspace.yaml
Normal file
33
modules/workspace/cerbos/policies/workspace.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
# yaml-language-server: $schema=https://api.cerbos.dev/latest/cerbos/policy/v1/Policy.schema.json
|
||||
# docs: https://docs.cerbos.dev/cerbos/latest/policies/resource_policies
|
||||
|
||||
apiVersion: api.cerbos.dev/v1
|
||||
resourcePolicy:
|
||||
resource: workspace
|
||||
version: default
|
||||
rules:
|
||||
|
||||
- actions: ["create"]
|
||||
effect: EFFECT_ALLOW
|
||||
roles: ["super"]
|
||||
|
||||
- actions: ["read"]
|
||||
effect: EFFECT_ALLOW
|
||||
roles: ["super", "admin", "user"]
|
||||
condition:
|
||||
match:
|
||||
expr: R.attr.id in P.attr.workspaceIds
|
||||
|
||||
- actions: ["update"]
|
||||
effect: EFFECT_ALLOW
|
||||
roles: ["super", "admin"]
|
||||
condition:
|
||||
match:
|
||||
expr: R.attr.id in P.attr.workspaceIds
|
||||
|
||||
- actions: ["delete"]
|
||||
effect: EFFECT_ALLOW
|
||||
roles: ["super"]
|
||||
condition:
|
||||
match:
|
||||
expr: R.attr.id in P.attr.workspaceIds
|
||||
Reference in New Issue
Block a user