service cloud.firestore {
match /databases/{database}/documents {
match /newsletter/{document=**} {
allow read: if user.auth != null;
allow write: if resource.data['__name__'] == 'sampl...@killerdomain.com';
}
}
}--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/5302066f-fa2e-49ba-8c82-89d95bb9ea0e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
service cloud.firestore {
match /databases/{database}/documents {
match /newsletter/{document=**} {
allow read: if user.auth != null;Hi Tomasz,It looks like the meta fields are on the resource object rather than the data object. So maybe just resource['__name__']?☼, Kato
On Thu, Mar 8, 2018 at 6:59 PM, Tomasz Iniewicz <tomasz...@gmail.com> wrote:
Hi, question regarding firestore rules:My current collection has documents whose id’s are email address and i am trying to validate an email address but can’t seem to select the "id" in the rule. I’ve tried the following; what am I missing?
- document.__id__
- document.__name__
- document.data.__id__
- etc...
Here is an example:service cloud.firestore {
match /databases/{database}/documents {
match /newsletter/{document=**} {
allow read: if user.auth != null;
allow write: if resource.data['__name__'] == 'sampl...@killerdomain.com';
}
}
}
--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/5302066f-fa2e-49ba-8c82-89d95bb9ea0e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/7ad679cc-491c-4895-9416-64ada09ea48d%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/7ad679cc-491c-4895-9416-64ada09ea48d%40googlegroups.com.
service cloud.firestore { match /databases/{database}/documents { match /newsletter/{email} { allow read: if request.auth != null; allow write: if email == 'pe...@gabriel.com'; } }}