Created
January 17, 2024 21:01
-
-
Save francium-lupe/f0866de1492f06bb50035830137b113d to your computer and use it in GitHub Desktop.
(ReBAC) in Node.js 7
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
resource Issue { | |
# Permissions | |
permissions = ["edit"]; | |
# Roles | |
roles = ["editor"]; | |
# UPDATED: added relationships | |
relations = { creator: User }; | |
# Any user with the "editor" role can "edit" | |
"edit" if "editor"; | |
# UPDATED: the user who created this issue has "editor" role | |
"editor" if "creator"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment