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
- Upgrading selfhost version?
It is okay to upgrade version to higher one, of my current version is 1.7.4 to 1.8.1. Is that safe to do cause my clients already have data on that? Also is a...
- Local Serverless Function Testing: Are D...
I have followed the instructions to get the CLI working, and have been able to log-in, initialize my project, and created a simple Python function, which calls ...
- Update user email using OTP
Hi, I am trying to implement email update using OTP, there is not password associated with the account. One solution I found online is creating appwrite functio...