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?

¿Fue útil?

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top