Forum Discussion
RLS Filtering additional dimensions
- 8 months ago
Hi Chewdata
Your approach is correct; you need to add restrictions for Behandelaren and Reviewers to the RLS role, but the expression you used is wrong.
You should first filter out the Teams permissions that the current user has, and then use those items to restrict Behandelaren and Reviewers.
In short, you need to change Behandelaren[Team] IN VALUES(Team[Team]) to:
VAR AccessTeamItems = CALCULATETABLE( VALUES(RLS[Team]), RLS[UPN]=USENAME(), ALL() ) RETURN Behandelaren[Team] IN AccessTeamItems // Reviewers[Team] IN AccessTeamItemsDid I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~
Hi Chewdata
Your approach is correct; you need to add restrictions for Behandelaren and Reviewers to the RLS role, but the expression you used is wrong.
You should first filter out the Teams permissions that the current user has, and then use those items to restrict Behandelaren and Reviewers.
In short, you need to change Behandelaren[Team] IN VALUES(Team[Team]) to:
VAR AccessTeamItems =
CALCULATETABLE(
VALUES(RLS[Team]),
RLS[UPN]=USENAME(),
ALL()
)
RETURN
Behandelaren[Team] IN AccessTeamItems
// Reviewers[Team] IN AccessTeamItems
Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~
- Chewdata8 months agoResponsive Resident
Yes this totaly did the trick, thanks a lot!