I tried to run a Multidimensional project with Dynamic RLS. I used a Sample for implement it.
In my sample scenario, I've a cub like below :
I tried to write correct MDX query for test result of users permission.
SELECT {[Measures].[Point Transaction Count],[Measures].[Amount],[Measures].[Balance]} ON 0,
NonEmpty ([Club].[Club].[Club].MEMBERS,([Users].[User Name].&[[MyDomain]\a.ghasemi],[Measures].[User Permission Count])) ON 1
FROM [DynamicPointTransaction]
GO
Point Transaction Count | Amount | Balance | |
---|---|---|---|
TestClub | 30 | 34151 | 99210 |
This result is true and when I change user name worked well in SSMS query editor.
Now, my problem in Dynamic RLS, When I tried set query for use dynamically users in VS browser I catch a error for permission dimension.
The 'Club' attribute in the 'Club' dimension has a generated dimension security expression that is not valid.
I created a Role by DimesionData with Allowed member set like below :
NonEmpty (
[Club].[Club Id].[Club Id].Members,
(
StrToMember ("[Users].[User Name].&[" + UserName () + "]"),
[Measures].[User Permission Count]
)
)
Add membership, add read permission for cub and dimensions.
When browse with Role or users raise this error :
No different between Role and Users... error is stable. When choice Admin users, I don't have any error.