Let's say I have 2 kinds of users in my app. One kind can only post texts, and those posts are stored in a collection called posts. And the other kind of users can only comment on those posts. Those comments are stored in a collection called comments. Now, I can't allow write permissions for the type 1 users to the comments collection. And vice versa is true, type 2 users can't write, update or delete documents in the posts collection.
How can I achieve this? I thought this would be pretty easy by using the teams feature, but it seems this feature is only for those who'll work on the development of this project; not the actual users.
For example, I would like to ideally be able to set permissions in the posts collection like this:
users[role: type_1] -> read, write
users[role: type_2] -> read
Where, role is an attribute for the users collection in my database. Thanks in advance.
Hi
Just to confirm, you have tried this? https://appwrite.io/docs/permissions
Yes I have! If you won't mind I would like to put my question in a simpler way: How can I give a certain group of users access to a certain collection, when the users are grouped according to, say, a role attribute in the userData collection?
I would like to be able to exactly what the teams feature does, but for the users of my app. My understanding is that the teams feature is only for the maintainers of the project. Please correct me if I'm wrong.
Recommended threads
- I recently switched to TablesDb. When li...
olddb.list_documents( queries =[ Query.order_desc("timestamp"), Query.equal("isPosted",[False]) ] ) Above works fine and reruns documents But below don't return...
- Database error validating 'min' and 'max...
I keep seeing an error when I try to add a column to a database table within the AppWrite cloud UI. I also see this error when trying to create or update a reco...
- Fine grained permissions for webRTC hand...
Hi, I am building a WebRTC P2P app for a university project and have hit a security limitation regarding permissions for anonymous users. The Architecture: We ...