can anyone tell what is wrong with this set of firebase rules
Try this:
- This provides an authenticated user access to just their own content. They can read and write in their own protected area, again using the "uid" as the marker for their data
{
"rules": {
"notice": {
"$uid": {
".read": "$uid === auth.uid",
".write": "$uid === auth.uid"
}
}
}
}
1 Like
but i do not want like this i want that an authenticated owner can write to database but anyone can read the database.
i a sorry i asked the question wrongly i found a way to fix this sorryagain
i am sorry i asked the question wrongly i found a way to fix this sorry again
Then like this:
Read All, but Write only to a User's Area
"rules": {
"notice": {
"$uid": {
".read": true,
// or ".read": "auth.uid != null" for only authenticated users
".write": "auth.uid == $uid"
}
}
}
}
1 Like
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.