Back

Document Permissions For Chat App

  • 0
  • Web
  • Realtime
aaronksaunders
22 Jun, 2023, 20:29

If i want any authenticated user to be able to read the document and only the creator to be able to update or delete

  1. What should I set the permissions to on the document
  2. Should I have any permissions on the collection or only on the Document

Thanks

TL;DR
1) To achieve the desired permissions, you should not set any specific permissions on the document itself. 2) You should set read permissions for any authenticated user at the collection level, and no specific permissions on the document. In summary, grant read permissions for any authenticated user at the collection level, and do not pass any permissions when creating the document.
Drake
23 Jun, 2023, 00:02

any authenticated user to be able to read the document

Grant read permissions to users at the collection level

only the creator to be able to update or delete

Enable document security on the collection and then don't pass anything for permissions when the user creates the document

aaronksaunders
23 Jun, 2023, 00:32

So by default the creator of the document has all Permission to the document by default

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more