问题
{
"rules": {
"Users": {
"$user_id": {
// Grants write access to the owner of this user account
// whose uid must exactly match the key ($user_id)
".write": "$user_id === auth.uid"
}
}
"$businessName": {
".write": "root.child('Users').child(auth.uid).child($businessName).child('Permission s').val() === 'MODERATOR'"
}
}
}
This is giving me an error:
Error saving rules - Line 10: Expected ',' or '}'.
The error says I'm missing a bracket for some reason. Did I miss a comma or something?
回答1:
As @Frank van Puffelen said I was just missing a comma before "$businessName".
来源:https://stackoverflow.com/questions/38604465/error-in-syntax-on-firebase-database-rules