Realtime database rules help

Hi there, is it possible, to make a setting in realtime database, where, only the creator of the content and someone else specified (admin) can change the content?
Actually, im sure this is possible with firebase rules, but i dont know what is the logic of how it would work.

the thing, im trying to avoid, is that some of my documents have a specific number as id and so if an other user tryies to make a document with the same document id (which is possible, if both of them do it a the SAME time, because the rule of what document can be created, is only monitored in frontend.) this means that the one document will be replaced by the other and i dont want that.

AS you can see bellow, in every object, like the no1, there is a uid, the best thing, would be to use that as the identifier if thats possible.


Thanks for any help

@stayfoolish hi there, ive seen you have knowledge in firebase rules, maybe you could help me, thank you in advance

On Firebase I am using the Firestore, not the Realtime Database. The application of security rules is slightly different between these two and therefor I can’t tell you precisly how it looks like. But I just had a glance into the Realtime Database documentation and there is everything you need including code examples: Understand Firebase Realtime Database Rules  |  Firebase Documentation

1 Like

ohh i see what you mean, i will definitely take a look in the documentation , and make it work, Thanks for the help!:grinning: