Admin Dashboard - View All Users

I am creating an Admin dashboard. I need to be able to search for data for specific users.

I’m starting by creating a dropdown menu that lists all users so I can select one to search with.

But I’m stuck. I’ve created an option set for User Role (Admin, User), and it’s set as a field on the user.

I realize this will come to Privacy Rules, but when I use the condition for when the user’s role = Admin, I can still only see the logged in user (who is an admin).

How do I set the privacy rules so that the Admin can see all users? There are currently 26 users in the database, but I can only see one.

Thanks!


The privacy rule looks correct to me, too. Please show us the Property Editor for that dropdown. Also, I’ve read elsewhere that the “ignore empty constraints” checkbox doesn’t behave as some of us would expect, so leave that unchecked. I’m pretty new to Bubble, so this seems tricky to me, too. I’m trying to reproduce your dropdown in my app and I’m having difficulty figuring out how to fill out the fields. Under “Choices source” I select “Search for users” expecting to be able to add “'s Email” bt instead I get operators like “:count” and “:contains”. Maybe you chose “Current user” because you couldn’t figure it out either?

Your privacy rule is wrong. Change your privacy rule to current user's Role is Admin

Current user and This user are different. Hope this helps :slight_smile:

2 Likes

Good catch!

Thank you so much! That was it. I searched for the difference between Current User and This User but was unable to find anything. Could you please either point me to a link that describes the difference and what to expect, or provide a quick explanation?

Thanks again!

Current User is the person who is logged in and using the application; they have the roles you assign them in the User data type (such as Admin).

This User is the user whose information is being accessed at the time. Your dropdown lists users; each one would be This User.

1 Like

Makes sense now. Thanks for clarifying that for me!