Error in syntax on Firebase database rules

隐身守侯 提交于 2019-12-10 23:28:57

问题


{
    "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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!