
Hi team
I have scenarios
- I have a collection
- User can read all of documents in the collection
- User can create documents on the collection
- User can edit/update documents that their created (only users own)
- User cannot edit other user document
How to setup the roles for this scenarios?
Thank you

Set collection Roles:- select users and tick create and read, make sure you have enabled document security. And while creating documents pass the list of permissions which contains Permission.update(Role.user(current_user_id)), Permission.delete(Role.user(current_user_id))

You don’t actually have to pass the Permissions - the creating user automatically has all permissions on the Document

@ideclon oh okay
Recommended threads
- "The document data is missing. Try again...
Hello, I am getting this error suddenly. I have been using this service for a year now, and I haven't made any changes to my code since then. My app was workin...
- Error: The document data is missing. Try...
I am not able to create any document on some of the collection/ DBs. As I can see many of us facing the same issue, need a quick resolution from the Appwrite Te...
- "Invalid relationship value. Must be eit...
In my app i am trying to update the documents in my databse from a form in my app, and i am getting this error Error updating event users: AppwriteException: I...
