# Privacy Rules settings for three types of permissions

**URL:** <https://forum.bubble.io/t/privacy-rules-settings-for-three-types-of-permissions/264169>\
**Category:** Database\
**Created:** [May 24, 2023, 7:02am UTC](https://forum.bubble.io/t/privacy-rules-settings-for-three-types-of-permissions/264169 "2023-05-24T07:02:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![y11](https://avatars.discourse-cdn.com/v4/letter/y/b77776/32.png) [@y11](https://forum.bubble.io/u/y11)\
**Post date:** [May 24, 2023, 7:02am UTC](https://forum.bubble.io/t/privacy-rules-settings-for-three-types-of-permissions/264169/1 "2023-05-24T07:02:03Z")

</div>

Hi,  
There are three User roles in my application.  
ADMIN, SUPERVISOR, and STAFF.

SUPERVISOR" manages multiple “STAFF”.  
A “STAFF” can be associated with multiple “SUPERVISORs”.

Only the Current User or the SUPERVISOR that manages the Current User can view the data assigned to a “STAFF”.

In this case, how should I set up the database and Privacy Rules?

---

<div class="post-metadata">

**Author:** ![mikeloc](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mikeloc/32/93001_2.png) [@mikeloc](https://forum.bubble.io/u/mikeloc)\
**Post date:** [May 24, 2023, 11:10am UTC](https://forum.bubble.io/t/privacy-rules-settings-for-three-types-of-permissions/264169/2 "2023-05-24T11:10:42Z")

</div>

Hi there, @y11… if I was doing what you described, I would use an option set to define the user roles, I would have a `role` field on the `User` data type (with that field being associated with the option set), and I would likely have a `staff` field on the `User` data type that is a list of users.

With that setup in place (and assuming you add users to a supervisor’s `staff` list field, of course), a privacy rule on the `User` data type that looks like the following should produce the desired result.

 ![privacy](https://us1.discourse-cdn.com/bubble/original/3X/7/d/7db3d41071fbe88c29dca9db3ce041fa8eceaf46.png)

FYI… before you try to create that privacy rule, go to the _Settings \>\> Versions_ tab and enable the experimental expression parentheses feature.

Hope this helps.

Best…  
Mike

---

<div class="post-metadata">

**Author:** ![y11](https://avatars.discourse-cdn.com/v4/letter/y/b77776/32.png) [@y11](https://forum.bubble.io/u/y11)\
**Post date:** [May 25, 2023, 2:16pm UTC](https://forum.bubble.io/t/privacy-rules-settings-for-three-types-of-permissions/264169/3 "2023-05-25T14:16:02Z")

</div>

@mikeloc

Hi, @mikeloc

I appreciate it very much.  
The problem I had been struggling with for two weeks has been solved by you.  
Thank you very much.
