How to restrict write access to /lastmodified table in database named /functions-project-12345 only to cloud function, read & write access to table /chat to everyone
/functions-project-12345
/lastmodified: 1234567890
/chat
/key-123456
username: "Mat"
text: "Hey Bob!"
/key-123457
username: "Bob"
text: "Hey Mat"
Cloud Functions run with administrative privileges, which means they bypass the security rules of your database. Knowing that, it is quite simple to secure the database to your requirements:
{
"rules": {
".write": false,
"chat": {
".write": true
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With