Open deepakbhatia opened 7 years ago
Update:
Adding this
".write":"(auth != null) && (!data.exists() || data.child('createdByUserId').val() === auth.uid)"
below "room-metadata"
with ".write":false
under "rules"
works.
No additional auth checks needed in ".validate"
.
Even replacing this
".write": "(auth != null) && (!data.exists() || data.child('createdByUserId').val() === auth.uid)"
under$roomId
with
".write":true
does not workUnless I put
".write":true
with the rules as root.I have to put the checking in the
.validate
section for doing the auth check.I have to do this,
".validate": "newData.hasChildren(['name','type']) && newData.child('createdByUserId').val() === auth.uid"
So is this now the way to do it or is this an error. Or I am doing something odd.