Hi, I have the following use case I'd like to mode...
# spicedb
p
Hi, I have the following use case I'd like to model in SpiceDB: three entities; users, folders and documents. Folders have a relation to users that have access to the folder. Users are allowed to add documents to a folder, when they add a document they can specify if other users with access to the folder have no_access, read_access or edit_access on the newly added document. So far I have a folder and a document that has a parent relationship to the folder. I have a member relation from folders to users and from documents to users I have a variety of relations such as readers/editors. On the documents I have permissions such as read and write which based on the relations in the document. Currently for the read permission I allow readers of the document and walk the parent relation to allow read access for members of the folder. This works but doesn't cover the actual requirement and I'm stuck on how to get from this to supporting specifying a default document access for members of the parent folder. Does anyone have any recommendations how to proceed? https://play.authzed.com/s/XLERW5c7mdpN/schema