Skip to content

Commit

Permalink
also user can view "allowed"
Browse files Browse the repository at this point in the history
  • Loading branch information
daisieh committed May 22, 2024
1 parent 36a1cdc commit 577a436
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions permissions_engine/authz.rego
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,11 @@ allow {
data.permissions.valid_token == true
input.body.input.token == input.identity
}

# As long as the user is authorized, should be able to see if they're allowed to view something
allow {
input.path == ["v1", "data", "permissions", "allowed"]
input.method == "POST"
data.permissions.valid_token == true
input.body.input.token == input.identity
}

0 comments on commit 577a436

Please sign in to comment.