ERROR FirebaseError: "Missing or insufficient permissions."
articles
key
name
...
uid (key user)
categories
key
...
...
service cloud.firestore { match /databases/{database}/documents { match /articles/{key} { allow read, create: if isSignedIn(); allow update, delete: if isOwner(); } }}
function isOwner() { return request.auth.uid == incomingData().uid}
function isSignedIn() { return request.auth.uid != null}--
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/456db0e9-e959-4ccf-a7a1-1e945b7731ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
incomingData() --> https://gist.github.com/mono0926/a22dbdff7c5f87080b92fbb7944a1f1
--
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/bb9bfcae-500b-4793-806a-4439d6f40247%40googlegroups.com.
sorry
function incomingData() {
return request.resource.data;}service cloud.firestore { match /databases/{database}/documents {
match /articles/{key} { allow read, create: if isSignedIn(); allow update, delete: if isOwner(); }
}}
function isOwner() {
return request.auth.uid == incomingData().uid}
function isSignedIn() {
return request.auth.uid != null}
function incomingData() {
return request.resource.data;}