I have setup firebase rules for users to read and write data to the database. Now I want to add another rule for admin user.
I am allowing users access through the auth.uid and want to set another level for an admin user.
Here's my current rule:
{
"rules": {
"users": {
"$uid": {
".read": "$uid === auth.uid",
".write": "$uid === auth.uid"
}
}
}
}
And I'm fetching data by pass the $uid in the url like so:
`https://blablabla.firebaseio.com/users/${uid}/places.json?auth=` + authToken
Users are signing up by email and password. Is there a way I can add a specific user as an admin and setup another rule to access all the data?
Firestorewith arolefield and checking it with these rules: firebase.google.com/docs/firestore/security/…. - Crazy Barney