I have customer id attribute populated with embed user id, but I need for the same user to be able to run reports for any of the 5 subaccounts under the main customer id
example: customer x is associated with attribute 123456. my row level security accounts for this and only shows this customer data for 123456. However, this customer also needs to see the 4 subaccounts listed under 123456. How do I make it so a user can see the subaccounts, but only for specific customers, not the entire system. I reviewed the Sql always where using an OR operator with attributes, but is the only way to do this to add additional user attributes and use the OR operator?
On top of my head:
sql_always_where: {{ _user_attributes['parent_id'] }} = ${reference_view.parent_id}
AND {{ _user_attributes['child_id'] }} = ${reference_view.child_id} ;;