# How to Structure Two Different User Roles + Admin

**URL:** <https://forum.bubble.io/t/how-to-structure-two-different-user-roles-admin/17086>\
**Category:** App Organization\
**Created:** [August 29, 2017, 11:12pm UTC](https://forum.bubble.io/t/how-to-structure-two-different-user-roles-admin/17086 "2017-08-29T23:12:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![vince](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/vince/32/15559_2.png) [@vince](https://forum.bubble.io/u/vince)\
**Post date:** [August 29, 2017, 11:12pm UTC](https://forum.bubble.io/t/how-to-structure-two-different-user-roles-admin/17086/1 "2017-08-29T23:12:33Z")

</div>

Hello everyone,

I’m a front-end developer / designer who is new to Bubble. I’m extremely excited by the possibilities it creates for me! I’m creating a simple user role structure for my app and would love to know if I’m headed in the right direction. Several people have posted on the forums about similar setups, but their questions have been different enough that I’m not sure they solve my problem.

I want to have three user roles, one of which is an admin.

The main role is a volunteer. They can manage their own profile and search and join events from a dashboard.

The other role is also a volunteer, but they have clicked on something on the dashboard (like a “become an organization” button) and have requested to represent an organization. This role is then allowed to see an organization dashboard that lets them post on behalf of the organization and manage its profile.

So my main question is – does this seem like a reasonable setup? And would I go about separating these roles via a new “role” field in the user table? I had initially thought to create volunteers and organizations as separate roles altogether, but I’d like for users associated with an organization to also be able to volunteer. Do I need to mess with the “privacy” tab (I honestly don’t quite yet understand the privacy tab)?

Thank you in advance, and I’m excited to join this community!

---

<div class="post-metadata">

**Author:** ![dbevan](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/dbevan/32/157741_2.png) [@dbevan](https://forum.bubble.io/u/dbevan)\
**Post date:** [August 30, 2017, 2:08pm UTC](https://forum.bubble.io/t/how-to-structure-two-different-user-roles-admin/17086/2 "2017-08-30T14:08:02Z")

</div>

I literally have the same setup with one of my apps. After a ton of confusion, testing, and headaches, here’s the best way to go about this:

Both “Volunteers” and “Organizations” have the abilities of “Volunteers”. This means the User Database Table that Bubble automatically provides should act as the “Volunteers” table.

Now, for “Organizations”, you want to create a separate table. One of the fields in this table will be “User” that has a data type of a User (essentially a volunteer).

This way, User’s that have an Organization attached will be able to have new data fields and be allowed to do different things compared to the regular User.

Lastly, for admin, you can either do the same approach used for Organization OR create a yes/no field in the User table called “admin”. It should automatically be set as ‘false’ when a user signs up. If you sign up and are an admin, just head over to the database, find your user, and change the admin field from ‘false’ to ‘true’.

Hope this all makes sense,  
Daniel

---

<div class="post-metadata">

**Author:** ![vince](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/vince/32/15559_2.png) [@vince](https://forum.bubble.io/u/vince)\
**Post date:** [August 31, 2017, 5:24pm UTC](https://forum.bubble.io/t/how-to-structure-two-different-user-roles-admin/17086/3 "2017-08-31T17:24:58Z")

</div>

Thanks so much for the detailed response! This makes a lot of sense, especially with how to define the organization. Glad I’m not completely off-base 😄

So when I show/hide data on the dashboard based on organization attachment, I’d condition the data to show by looking up the current user on the organization table’s user field, not by searching the user table for an organization field?

Thanks again!

---

<div class="post-metadata">

**Author:** ![dbevan](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/dbevan/32/157741_2.png) [@dbevan](https://forum.bubble.io/u/dbevan)\
**Post date:** [August 31, 2017, 5:30pm UTC](https://forum.bubble.io/t/how-to-structure-two-different-user-roles-admin/17086/4 "2017-08-31T17:30:43Z")

</div>

Yes, so in the conditionals, I’d do something like:

if search for organizations (User = current user) is not 0, then make this element visible. Obviously, the elements that will become visible should be hidden when the page is loaded.

---

<div class="post-metadata">

**Author:** ![vince](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/vince/32/15559_2.png) [@vince](https://forum.bubble.io/u/vince)\
**Post date:** [August 31, 2017, 5:50pm UTC](https://forum.bubble.io/t/how-to-structure-two-different-user-roles-admin/17086/5 "2017-08-31T17:50:51Z")

</div>

Perfect! And really, thanks again for the quick and detailed response. This is really fun to learn and play with.

---

<div class="post-metadata">

**Author:** ![dbevan](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/dbevan/32/157741_2.png) [@dbevan](https://forum.bubble.io/u/dbevan)\
**Post date:** [August 31, 2017, 5:53pm UTC](https://forum.bubble.io/t/how-to-structure-two-different-user-roles-admin/17086/6 "2017-08-31T17:53:19Z")

</div>

No problem. Hit me up anytime.

---

<div class="post-metadata">

**Author:** ![2morses](https://avatars.discourse-cdn.com/v4/letter/2/9e8a1a/32.png) [@2morses](https://forum.bubble.io/u/2morses)\
**Post date:** [February 9, 2019, 10:00am UTC](https://forum.bubble.io/t/how-to-structure-two-different-user-roles-admin/17086/7 "2019-02-09T10:00:53Z")

</div>

@dbevan - Sorry to reply to an old thread, but I’m in this situation and I’ve read through many posts in the forum on this and I’m still not getting the correct result. I have 4 user types so I’m not using yes/no. I think it is because I am not doing “search for”  
If I created a “user\_role” field on the user and made this user an “admin” (currently text in the user role field) does it work to say make visible if "current user’s user\_role is “admin” or do I have to use the “do a search for” function? If so, what is the right syntax?
