fm0
09/13/2023, 8:53 PM/** user represents a user that can be granted role(s) */
definition user {}
definition anonymoususer {}
/** document represents a document protected by Authzed. */
definition board {
/** writer indicates that the user is a writer on the document. */
relation writer: user
/** reader indicates that the user is a reader on the document. */
relation reader: user | anonymoususer:*
/** edit indicates that the user has permission to edit the document. */
permission edit = writer
/**
* view indicates that the user has permission to view the document, if they
* are a `reader` *or* have `edit` permission.
*/
permission view = reader + edit
}
When trying the following thing it complains, not too sure why
board:whiteboard-4444#reader@anonymoususer:1222
For now I don't really ever differentiate between anonymous users but I wanted to keep this functionality in case I wanted to later add it
Thanks 🙂