tokei/tests/data/open_policy_agent.rego
eulegang 3346143ced
add OpenPolicyAgent support and test (#740)
Co-authored-by: eulegang <eulegang@eulegang.dev>
2021-05-09 19:57:59 +02:00

13 lines
307 B
Rego

# 13 lines 8 code 3 comments 2 blanks
package application.authz
# Only owner can update the pet's information
# Ownership information is provided as part of OPA's input
default allow = false
allow {
input.method == "PUT"
some petid
input.path = ["pets", petid]
input.user == input.owner
}