Created
January 17, 2024 22:38
-
-
Save francium-lupe/d90ced2c11df3c2af1bab4df114e659b to your computer and use it in GitHub Desktop.
(ReBAC) in Node.js 12
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 repository Relation | |
relations = { creator: User, repository: Repository }; | |
# Any user with the "editor" role can "edit" | |
"edit" if "editor"; | |
# User who created this issue has "editor" role | |
"editor" if "creator"; | |
# UPDATED: admins on repository have "editor" role | |
"editor" if "admin" on "repository"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment