In Cloud Firestore Rules - I have a document called task
and I want to see if some data (assignee
field) is null / don't exists.
I've tried:
resource.data.assignee == null
- Does not work (Error)!resource.data.hasAll(['assignee'])
- Does not work (Error)
From the documentation - it states that this indeed creates an error:
// Error, key doesn't exist
allow read: if resource.data.nonExistentKey == 'value';