Created
June 3, 2017 16:13
-
-
Save tsandall/3034c7fd8df7aa274b7210d384b14bed to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package acmecorp.api | |
| import data.acmecorp.roles | |
| default allow = false | |
| allow { | |
| input.method = “GET” | |
| input.path = [“accounts”, user] | |
| input.user = user | |
| } | |
| allow { | |
| input.method = “GET” | |
| input.path = [“accounts”, “report”] | |
| roles[input.user][_] = “admin” | |
| } | |
| allow { | |
| input.method = “POST” | |
| input.path = [“accounts”] | |
| roles[input.user][_] = “admin” | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment