Privacy Rules with Multiple Organizations in Bubble

Hello everyone,

I believe this might be hard to achieve without creating a join table, but I’d like to ask anyway.

Is it possible to compare two lists in Bubble’s Privacy Rules?

Context:

  • I have a Profile table that can be linked to multiple Organizations (the field is a list).

  • In the User table, there is a reference to Profile.

  • I’d like to set up Privacy Rules so that a user can only see profiles that share at least one organization with them.

A condition like:
This Profile's Organizations contains Current User's Profile's Organizations
does not work.

I created a join table Organization x Profile, but now I realize I also need to replicate some profile attributes there, which complicates the model.

Has anyone faced this scenario and found a clean solution?

Maybe this work for you This Organization x Profile's Organization is in Current User's Profile's Organizations

here is what i did

logically correct: it checks if the Organization in the join record exists in the Current User’s Profile’s list of Organizations., This should work for controlling access to the join records themselves. That is, users will only see the Profile x Organization records where there is a shared organization with their profile.

  • This rule only controls the join table data.

  • If your goal is to control access to the actual Profile fields, you can’t set a list-intersection rule directly on Profile. Instead, you need to:

  1. Keep the join table as you have.

  2. In searches for Profiles, do something like:

Search for Profiles:filtered
  This Profile is in Search for Profile x Organizations:filtered
    Organization intersects with Current User's Profile's Organizations

I hope it’s works for you. Thanks :slight_smile:

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