Firebase security rules based on userId attribute -


please see data structure

"errands" : {   "-k0dgrao6vsqkhrwiajq" : {     "name" : "milk",     "permissions" : [ {       "userid" : "ca8d19cb-f1d7-4bfd-9471-fb88c469b6ca"     }, {       "userid" : "ef4bacad-d713-47ac-853e-b3ec3e4bf684"     } ],     "store" : "coscto"   },   "-k0dhstsyrfm3uzjptnn" : {     "name" : "milk",     "permissions" : [ {       "userid" : "ca8d19cb-f1d7-4bfd-9471-fb88c469b6ca"     }, {       "userid" : "ef4bacad-d713-47ac-853e-b3ec3e4bf684"     } ],     "store" : "coscto"   } } 

i trying provide access based on userid attribute. says access denied.

".read": "root.child('errands').child('permissions').child('userid').val() === auth.uid ", 


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -