I want to make it s.t. a user can see a document only if he created it AND he has a "subscriber" label.
Here's my current setup:
- Collection-level permissions: only users with with the "subscriber" label can create documents. No other permissions are given.
- Document-level permissions: when creating a document, I pass the following permissions array: `[ Permission.read(Role.label('subscriber')), Permission.read(Role.user(userId)), Permission.update(Role.label('subscriber')), Permission.update(Role.user(userId)), Permission.delete(Role.label('subscriber')), Permission.delete(Role.user(userId)),
]`
Yet it doesn't work. It works as if it's OR operator between the permissions, not AND.
What I did: researched documentation, watched official videos, tried to change this setup. Probably I'm missing something obvious. Please help.
Recommended threads
- Appwrite Cloud project is paused and nev...
Hi Appwrite Team & Community, I am facing a problem with one of my Appwrite Cloud projects which seems to be identical to the other cases of "paused projects" ...
- Timed out waiting for runtime error
execution id 6a3e0791978712d81ee0 im having issue with appwrite function runtime performance. even after 4gbram and cpu same function sometimes completes in a...
- Project auto-blocked after load testing ...
Hi team 👋 My project has been automatically blocked with the message: "Project is currently blocked — Access to this project is restricted. Contact support if...