SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Dynamic Dimension Security in Analysis Services based on User and Datasource Dimension


Dynamic Dimension Security in Analysis Services based on User and Datasource Dimension

Author
Message
radik86
radik86
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 117
Hello I have an Question to Dynamic Dimension Security in AS.
I have a following Problem. I want to Secure Dimension Members based on User Account and Datasource where the data comes from.
I have a Source Table which contains keys for all sources where the data comes from and I have User Table with Users. n-Users can belong to one Datasource. And I have Project Table, which contains a Datasource Key (1:1 relationship).

Now what I want is to create a Role to secure Project Dimensions Members depending on User and Datasource.
Example.
User "Paul" has acces to "Source A", now when the User "Paul" want to use the Project Dimension he should only see the Projects which come from "Source A".

I Have:
User Dimension Table
User ID | Username
1 | Paul
2 | Peter

Datasource Dimension Table
Source ID | Source
A | Source A
B | Source B

UserDatasourceFact
UserID | SourceID
1 | A
2 | A

I have Project Dimension Table:
Project ID | Source
P1 | A
P2 | A
P3 | B

Based on this Data.

User "Paul" should only see Project "P1" and "P2".
Any Ideas how it is possible to realize this without to build Mapping Table between User and Project.

I created a User, Datasource and Proejct Dimension. Related the User and Datasource Dimension via UserDatasourceFact. Then I related the Datasource and Project Dimension via Datasource ID. And I tried this Query:

SELECT
[Project Dim].[Project Title].Children on 0
FROM (
SELECT
Exists([Mandant Dim].[Mandant Name].CHILDREN,
[User Dim].[Username].&[Peter], "User Mandat Fact") on 0
FROM [Security Concept])

But it returns all Projects.

Thanks in advance.
I would appreciate your help.
Igor Micev
Igor Micev
SSCrazy Eights
SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)SSCrazy Eights (10K reputation)

Group: General Forum Members
Points: 9952 Visits: 5155
Hi,
Should you have put the second expression of the Exists() into brackets?

SELECT
[Project Dim].[Project Title].Children on 0
FROM (
SELECT
Exists([Mandant Dim].[Mandant Name].CHILDREN,
{[User Dim].[Username].&[Peter], "User Mandat Fact"}) on 0
FROM [Security Concept])

Second, what about this data
UserDatasourceFact
UserID | SourceID
1 | A
2 | A
"Paul" and "Peter" see same group of projects?

Regards,
Igor

Igor Micev,
My blog: www.igormicev.com
radik86
radik86
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 117
Hi Igor,
thank you for your Response.

@Should you have put the second expression of the Exists() into brackets?
This Query was only a try to filter the Projects based on the returned Datasources. I am not sure wether the query is correct.

Yes Peter and Paul have acces to the same Datasource. But they both should only see P1 and P2, because only this Projects comes from Datasource A.
MMartin1
MMartin1
SSCertifiable
SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)

Group: General Forum Members
Points: 6817 Visits: 2033
UserDatasourceFact
UserID | SourceID
1 | A
2 | A

I have Project Dimension Table:
Project ID | Source
P1 | A
P2 | A
P3 | B


I am wondering if the projects table can serve as a fact table that contains source and user attributes.

----------------------------------------------------
How to post forum questions to get the best help
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search