I'm trying to create an admin interface for the web application I'm developing. I'm using Angular with Angularfire2. I'm using Firebase Firestore as the database.
I wanted to see how we can implement an isAdmin flag in the users collection so that specified users can access admin features.
Can anyone shed some light on how I can approach to develop this. I know there are security rules you can set on the users document. If authenticated users are allowed to read and write to their own doc, what's stopping them from changing the isAdmin flag?
Or is this really as simple as adding a boolean key and toggling that in the admin interface?
Thanks, Walter