add user update/delete policy

This commit is contained in:
Gsk54 2023-01-19 16:27:14 +01:00
parent d75ab7f82a
commit 02eae16665
2 changed files with 22 additions and 0 deletions

11
opa/user/delete.rego Normal file
View File

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

11
opa/user/update.rego Normal file
View File

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