I have a db where I need read access to all users and write access when invoked in an apps script running by the user = \'firebaseowner@gmail.com\'
My firebase structu
You should check the auth variable.
To define the security rules that allow write access to all the locations by this email address firebaseowner@gmail.com
only:
{
"rules": {
".read": true,
".write": "auth != null && auth.token.email == 'firebaseowner@gmail.com'"
}
}
To define the security rules that allow write access to only the location /users
by this email address firebaseowner@gmail.com
only:
{
"rules": {
".read": true,
"users": {
".write": "auth != null && auth.token.email == 'firebaseowner@gmail.com'"
}
}
}