[Solved] User "location" Restrictions

Hello! I’m new to Bubble (I just started yesterday). I have a basic understanding of how a few things work, but here is my problem.

Problem: My users will need to be restricted by both Company and the site within the company. For example, John smith is the supervisor of Building A. He should only see users at Building A.

What is the easiest way to do set this restriction? I didn’t want to list out every site individually in the database as a separate user field.

Thank you so much in advance!

Hi @josh10,

A great place to start is to first go through all the free Bubble lessons.. There are also great external resources like Coaching No Code Apps from @romanmg and LearnTo from @dan1.

For your specific question, I think I would start off this way:

Create a data type of Location which will have an entry for each of the building’s. You can add all sorts of fields pertinent to these locations.

On your User type, add a field that references that Location.

Then is searches and/or filters you can add constraints based on the Current User Location.

You can also use the Privacy tab to protect the data at its source – the following would mean that the Current User of your app, will only have access to other User records that have the same location. I can also see you having Roles that further restrict. However you might want to put that off until you have worked with Bubble a bit longer.

You are doing the right thing by jumping right in, but you’ll really be better in the long-haul if you take a look at those resources noted above as the basics are needed as a solid foundation!

Welcome.



Looking to improve your Bubble™ skills?

Let me turn
:thinking: :tired_face: :confounded:

into
:grinning: :sunglasses: :woman_student:

Coaching and Development at https://uniqueideas.com or schedule a free intro session :gift:

Ken Truesdale
LinkedIn

3 Likes

Thanks for the help! I’m going to try that tonight! I’ll admit you are right. I spent the entire morning going through some basic guides and videos. I have a better understanding, but your explanation will help me immensely!

So basically I was a rookie and the secret was to add conditional data source changes to modify data! Thanks everyone!

This topic was automatically closed after 70 days. New replies are no longer allowed.