You can utilize exists in your write rule:
"chat_list": {
"$chat_entry": {
".write": " !data.exists() "
}
}
This will make it possible to append but not to write to a record which already exists.
Pregunta
I'd like to create a simple chat app, but I don't want any user to be able to edit the chat-entry list - but I do want any user to be able to append to it. Is this possible?
Solución
You can utilize exists in your write rule:
"chat_list": {
"$chat_entry": {
".write": " !data.exists() "
}
}
This will make it possible to append but not to write to a record which already exists.