-
-
Save cannarron/47ca9a03d3d9ce1915a5b426e75e2bc8 to your computer and use it in GitHub Desktop.
Authorization schema for a demo real-time messaging app
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
entity user {} | |
entity roles { | |
relation admin @user | |
} | |
entity message { | |
relation owner @user | |
// permissions | |
permission create = owner | |
} | |
entity chatroom { | |
relation parent @roles | |
// represents owner of this repository | |
relation owner @user | |
// permissions | |
permission delete = parent.admin or owner | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment