Problem with Privacy Rules and Repeating Group

Hello guys,

First of all, I’m in love with Bubble and this is definitely the future of building applications in my opinion. Really good job, Bubble team and community!

Now, I have a problem with my Privacy Rules. Somehow the data that I want to show is not showing if I set Privacy Rules.

I have three databases:

  • Employees
  • Employers
  • Users

Employees have a foreign key to Employers and Employers in their turn contain a list of Users (most of the time this is just one user, but in the future when I want to add admins, it might come in handy to add multiple users)

I want to show a Repeating Group with Employees where their Employers’s Users contain Current User.

But when I set this Privacy Rule, it doesn’t show me the Employees anymore

Please help me!

It is probably because of this:

It is the issue that is on the top of my wishlist for Bubble to fix!

I don’t have time to answer this one properly now, but I’ll check back later in case one of the other community members hasn’t replied yet. In summary, you’ll need restructure the layout of your DB so that your privacy rules can be applied to the first level “This employees x” instead of “This employees X’s Y”.

Can a user belong to multiple employers? If not, you might want to remove the employee data type and merge it into the users data type.

What if you added an Employer field to the Users type (which could be left blank if it’s not linked to an employer etc). Then you could potentially do

Current User’s Employer is This Employee’s Employer

Give it a go.

Yeah, it’s the complexity of the Privacy Rules like mentioned that is the bottleneck!

Thanks a lot for the messages and help!!

I have created an ‘End Employer’ in the Employee table which has a list of Users that are the ‘Employers’ and have the Privacy Rule set to This Employee’s End employer (User) contains Current User