Implement user level data setup using the sample given in this link https://firebase.google.com/docs/database/security/quickstart#sample-rules Want to implement read/write access only at user level keeping read only rule intact on other nodes.
Final Rule written as
{
"rules": {
"users": {
"$uid": {
".read": "$uid === auth.uid",
".write": "$uid === auth.uid"
}
},
".read": "auth != null",
".write": "false"
}
}
Sample database structure
Want to provide read / write access only to users node not others.
Sample JSON Data
{
"zmjilhwtlo":{
"MapData":[
{
"CaseId":"1",
"SectionId":"1"
},
{
"CaseId":"2",
"SectionId":"2"
}
],
"MapDataRoot":[
{
"SrNo":"1",
"IsFav":"0",
"ChapterNo":"data",
"ChapterName":"dad",
"ActId":"dfd",
"SectionName":"dfd",
"Description":"dfd"
}
]
},
"hvbxaotcxw":{
"MapData":[
{
"CaseId":"1",
"SectionId":"1"
},
{
"CaseId":"2",
"SectionId":"2"
}
],
"MapDataRoot":[
{
"SrNo":"1",
"IsFav":"0",
"ChapterNo":"data",
"ChapterName":"dad",
"ActId":"dfd",
"SectionName":"dfd",
"Description":"dfd"
}
]
},
"aundpytdod":{
"MapData":[
{
"CaseId":"1",
"SectionId":"1"
},
{
"CaseId":"2",
"SectionId":"2"
}
],
"MapDataRoot":[
{
"SrNo":"1",
"IsFav":"0",
"ChapterNo":"data",
"ChapterName":"dad",
"ActId":"dfd",
"SectionName":"dfd",
"Description":"dfd"
}
]
},
"embpkeanaj":{
"MapData":[
{
"CaseId":"1",
"SectionId":"1"
},
{
"CaseId":"2",
"SectionId":"2"
}
],
"MapDataRoot":[
{
"SrNo":"1",
"IsFav":"0",
"ChapterNo":"data",
"ChapterName":"dad",
"ActId":"dfd",
"SectionName":"dfd",
"Description":"dfd"
}
]
},
"users":{
}
}




usersnode and the corresponding uid's beheath it. Can you please add a more specific one? - Alex Mamo/users/e32bcdf5..... - Frank van Puffelen