dbTalk Databases Forums  

Dynamic Security On Parent Child Dimension

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Dynamic Security On Parent Child Dimension in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
naseer78
 
Posts: n/a

Default Dynamic Security On Parent Child Dimension - 04-19-2006 , 12:18 PM






I am USING dynamic security WITH MEMBER property

our employee dimension is parent-child and I need an expression
for the Allowed Members in the security ROLE

WHEN I put THE below code IN Allowed Members

Filter([Employees].members,Employees.CurrentMember.Properties("Login Name")
= Username)

I got THE following error

Dimension security syntax error:
Formula error - property name is not valid: "LoginName"
Do you still want to use this expression for dimension security?
Yes No

Then I put This code IN Allowed Members


I also got THE following error

Dimension security syntax error:
The operation has failed because of an error in the COM component -
unknown error
Do you still want to use this expression for dimension security?
Yes No

I already made THE MEMBER property WITH NAME "LoginName"

Can ANY one help?

Thankx IN Advance.


Reply With Quote
  #2  
Old   
Deepak Puri
 
Posts: n/a

Default Re: Dynamic Security On Parent Child Dimension - 04-19-2006 , 05:44 PM






One thing to check is what levels the "LoginName" property is defined
for - is it only at a single level? If it is only defined at, say, the
[EmployeeName] level, then:

Quote:
Filter([Employees].[EmployeeName].Members,
Employees.CurrentMember.Properties("LoginName")
= Username)
Quote:

- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***


Reply With Quote
  #3  
Old   
naseer78
 
Posts: n/a

Default Re: Dynamic Security On Parent Child Dimension - 04-20-2006 , 02:29 AM



Dear Deepak Puri:

Thankx for reply.

I have a parent child dimension and Levels are
CEO
Senior Managment
Level
Level 01
Level 02
Level 03
Level 04

Dimension Editor In parent child dimension I have one level with name
Employee Id
and in Level property "Level Naming Template" I make the above Levels.
The member property with name "LoginName"
I create on "[Employee Id]" this
I need to make this security on each level.
How I can do this, I need code of that

And How I make LoginName member property on which level
Remember I have a parent child dimension.

Thankx in advance.

Regards


Reply With Quote
  #4  
Old   
hoffmadi
 
Posts: n/a

Default Re: Dynamic Security On Parent Child Dimension - 04-20-2006 , 04:41 AM



Hello,

if i understand your problem right, i think their is a easy way - have
a look:

This is a example how we handle this:

Username = Ancestor([ProfitCenter].CurrentMember,
[ProfitCenter].[ProfitCenter 02]).Properties("Owner")
or
Username = Ancestor([ProfitCenter].CurrentMember,
[ProfitCenter].[ProfitCenter 03]).Properties("Owner")
or
Username= Ancestor([ProfitCenter].CurrentMember,
[ProfitCenter].[ProfitCenter 04]).Properties("Owner")
or
Username = Ancestor([ProfitCenter].CurrentMember,
[ProfitCenter].[ProfitCenter 05]).Properties("Owner")
or
Username = Ancestor([ProfitCenter].CurrentMember,
[ProfitCenter].[ProfitCenter 06]).Properties("Owner")
or
Username = Ancestor([ProfitCenter].CurrentMember,
[ProfitCenter].[ProfitCenter 07]).Properties("Owner")
or
Username = Ancestor([ProfitCenter].CurrentMember,
[ProfitCenter].[ProfitCenter 08]).Properties("Owner")
or
Username = Ancestor([ProfitCenter].CurrentMember,
[ProfitCenter].[ProfitCenter 09]).Properties("Owner")

hope this helps, please let me know

greetz from germany,

dietmar


Reply With Quote
  #5  
Old   
naseer78
 
Posts: n/a

Default Re: Dynamic Security On Parent Child Dimension - 04-20-2006 , 06:09 AM



Dear Dietmar,

Thankx for reply.

This will work on cell security. but not work on dimension security.

My client need Dimension Security.

If this code is apply on dimension Allowed members.

it give an error SET cannot convert to expression

when I applied conversion function which make SET the code generate
another error

Formula Error.

Thankx in advance for helping me.

Regards,


Reply With Quote
  #6  
Old   
Deepak Puri
 
Posts: n/a

Default Re: Dynamic Security On Parent Child Dimension - 04-20-2006 , 11:08 AM



Since Employees is a parent-child dimension, the "LoginName" Member
Property should be defined for all individual employees. You may just
need to exclude the [(All)] level member:

Quote:
Filter(Except([Employees].Members,
[Employees].[All Employees]),
Employees.CurrentMember.Properties("LoginName")
= Username)
Quote:

- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.