Dynamic RLS for Team Level Access

Hi all,

I got a request to allow user not only to view own data, but also their belonging team data.

Attachment is my mock up data model and I had setup a dynamic security role, however, I must use the bidirectional realtionship to fulfill this request.

  1. Apply role to Team_Profile, then bidirectional filter to Team_Manager table
  2. Team_Manger table to filter the account profile

Although it is working, any recommendation to avoid that bidirectional relationship and static role?

cos, I got so many team and user in the real model. It is hard to setup static role

chiu2003_0-1708920123198.png

Thanks a lot!

Dynamic RLS for Team Level