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
- Attributes Confusion
```import 'package:appwrite/models.dart'; class OrdersModel { String id, email, name, phone, status, user_id, address; int discount, total, created_at; L...
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...
- Edit ID of an existing collection
Hi there. Is it possible to edit an ID of an existing collection? Right now it looks impossible from AppWrite cloud at least.