Update document & admin creating

Actions & Logic

Hello,

I am new to flutterflow and this is the first app I'm working on, so if I'm asking a dumb question please forgive me :-)

I'm making an admin dashboard to see the members of the team, as well as the possibility to approve membership (after they signed up). I did a backend query of the user collection from Firestore on the listview. I want to make an action on the button (which will only be visible when approved = false) to approve membership and thus update the value of 'approve' of that user from false to true.

I have 2 questions:

1) Should I do this by selecting the reference (user reference) under user Document (from listview query) and then set the approved field to true?

2) How do I assign admin privileges to a user? In my project there will be 3 admins. My plan is to make a button widget on the homepage which will be only visible to admins, and when clicked leads to the admin dashboard. I am planning on doing this by making a boolean 'isAdmin' under the user collection. Is this correct thinking? And how do I assign this admin role for the 3 specific users I have in mind?

Thanks in advance!

What have you tried so far?

Looked it up online

Did you check FlutterFlow's Documentation for this topic?
Yes
1
3 replies