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.
TL;DR
Developers want to group permissions as a logical AND. Current setup uses collection-level and document-level permissions with an array of permissions including read, update, and delete. The issue is permissions seem to act as an OR operator instead of AND. Looking for help to resolve this issue.Recommended threads
- cant resume project
Invalid console fingerprint event i try man time
- Realtime for files() works almost well, ...
I have been trying to make use of realtime, today (14.03.26) I have pulled all the latest versions of docker images, and sdk available. Whats working: - Conn...
- Function issue
Hi,idk whats wrong with my function but i made some changes to the env var and made sure they saved then i redeployed it,but then after it redeeployed it asked ...