Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error in syntax on Firebase database rules

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

like image 945
XvKnightvX Avatar asked Mar 07 '26 02:03

XvKnightvX


1 Answers

As @Frank van Puffelen said I was just missing a comma before "$businessName".

like image 90
XvKnightvX Avatar answered Mar 10 '26 01:03

XvKnightvX



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!