Forum Discussion
RLS: Users with multiple roles filter problem
JVidal you can surely achieve any logic in RLS, I have written few blogs on RLS , not directly solution to your problem but it explains how RLS works and you can implement it in your model. You can check blogs at this link.
I would 💖 Kudos 🙂 if my solution helped.
- JVidal6 years agoHelper I
Hi,
Thanks for the link, I will have a look. Perhaps I should have mentioned that the roles come from different dimension tables. So I have Companies in one table and Departments in another table.
Kind regards,
- parry2k6 years agoSuper User
- JVidal6 years agoHelper I
Hi parry2k
I have read your post and I suspect you have all your data in 1 table and then your measure works, but if your filtering criteria is in different tables, I am not sure how to implement the measure.
On the other hand, the example of your post is exactly what I want to avoid. I don't want users to see outside their company/department.
So I have 3 case scenarios:
- Users who can see the entire company -> No issues here (RLS to filter Company)
- Users who can see Department for all the companies -> No issues here (RLS to filter Department)
- Users assgined to a specific company and department -> Issue is here as the current setup of applying two RLS roles is not applying correctly, as it will show the entire company and Department for all companies. It looks like the filter is applied with an OR statement instead of and AND statement.