lemonsrc
03/30/2023, 6:17 PMdefinition user {}
definition document {
relation writer: user
relation reader: user
/**
* edit determines whether a user can edit the document
*/
permission edit = writer
/**
* view determines whether a user can view the document
*/
permission view = reader + writer
}
For example, using the above schema, I'd want to be able to do query for information like the following: user:id [document.edit, document.view]
. I'm intending to use this information to control component visibility. Any thoughts or suggestions of other directions to go in?