Last active
August 29, 2023 13:56
-
-
Save francium-lupe/42ac1610bbb12a00a615bf37e36c63e8 to your computer and use it in GitHub Desktop.
ReBAC 2
This file contains 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
actor User {} | |
global { | |
roles = ["admin"]; | |
} | |
resource Vehicle { | |
permissions = ["security", "update", "updateAuthorizedUsers"]; | |
roles = ["admin", "manager", "driver"]; | |
relations = { currentlyBookedBy: User }; | |
"driver" if "currentlyBookedBy"; | |
"security" if "driver"; | |
"update" if "manager"; | |
"updateAuthorizedUsers" if "admin"; | |
"admin" if global "admin"; | |
"manager" if "admin"; | |
"driver" if "manager"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment