How to set security rules for database without user authentication in which user can change there own data only. When app starts for the first time new data item gets added without any authentication with unique ID.
My JSON data looks like this:
{
"Rand3435" : {
"Score" : 10,
"DID" : "Rand3435",
"CanDance" : "No"
},
"Rand7765" : {
"Score" : 25,
"DID" : "Rand7765",
"CanDance" : "Yes"
},
"Rand6769" : {
"Score" : 0,
"DID" : "Rand6769",
"CanDance" : "No"
},
"Rand1326" : {
"Score" : 10,
"DID" : "Rand1326",
"CanDance" : "No"
},
"Rand9879" : {
"Score" : 10,
"DID" : "Rand9879",
"CanDance" : "Yes"
},
"Rand5455" : {
"Score" : 10,
"DID" : "Rand5455",
"CanDance" : "No"
},
"Rand2322" : {
"Score" : 19,
"DID" : "Rand2322",
"CanDance" : "No"
}
}
What will be the rules in JSON format to put in the rules section?
Please help, I am new to Firebase. Thanks