Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Dynamic Dimension Security in Analysis Services based on User and Datasource Dimension Expand / Collapse
Author
Message
Posted Monday, March 31, 2014 7:26 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, April 15, 2014 3:34 AM
Points: 2, Visits: 83
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.
Post #1556459
Posted Monday, March 31, 2014 10:06 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 6:19 AM
Points: 2,963, Visits: 2,982
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,
SQL Server developer at Seavus
www.seavus.com
Post #1556569
Posted Tuesday, April 1, 2014 1:10 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, April 15, 2014 3:34 AM
Points: 2, Visits: 83
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.

Post #1556822
Posted Friday, May 2, 2014 2:03 PM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Yesterday @ 6:01 PM
Points: 356, Visits: 871
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.
Post #1567172
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse