Last active
July 18, 2022 21:16
-
-
Save flyingsilverfin/99dfd8c5436d183ffe6bc4f344f8aa83 to your computer and use it in GitHub Desktop.
Inference in TypeDB - Permissions Schema
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
define | |
user sub entity, | |
plays team-membership:member, | |
plays read-access:reader, | |
plays write-access:writer, | |
plays resource-ownership:owner; | |
team sub entity, | |
plays team-membership:team, | |
plays read-access:reader, | |
plays write-access:writer, | |
plays resource-ownership:owner; | |
resource sub entity, | |
plays read-access:readable, | |
plays write-access:writable, | |
plays resource-ownership:resource; | |
team-membership sub relation, | |
relates member, | |
relates team; | |
access sub relation, abstract, | |
relates accessor, | |
relates resource, | |
owns permission; | |
write-access sub access, | |
relates writer as accessor, | |
relates writable as resource; | |
read-access sub access, | |
relates reader as accessor, | |
relates readable as resource; | |
resource-ownership sub relation, | |
relates owner, | |
relates resource; | |
permission sub attribute, value string; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment