Merge branch 'fixOpa' into 'main'

fix opa rules

See merge request v3/services/auth!10
This commit is contained in:
Sylvain Briat 2023-01-30 14:54:19 +00:00
commit 3258aba0dd
4 changed files with 14 additions and 14 deletions

View File

@ -1,11 +1,11 @@
package user.delete package USER.DELETE
default allow := false default allow := false
allow := true { allow {
input.uuid == input.owner input.uuid == input.owner
} }
allow := true { allow {
input.role == "admin" input.role == "admin"
} }

View File

@ -1,7 +1,7 @@
package user.list package USER.LIST
default allow := false default allow := false
allow := true { allow {
input.role == "admin" input.role == "admin"
} }

View File

@ -1,4 +1,4 @@
package user.read package USER.READ
default allow := false default allow := false

View File

@ -1,11 +1,11 @@
package user.update package USER.UPDATE
default allow := false default allow := false
allow := true { allow {
input.uuid == input.owner input.uuid == input.owner
} }
allow := true { allow {
input.role == "admin" input.role == "admin"
} }