Hierarchy security update require a call to SecurityRefresh Function

Post Reply
lav4you
Posts: 52
Joined: Fri Jan 02, 2009 1:20 pm

Hierarchy security update require a call to SecurityRefresh Function

Post by lav4you »

Hi

I am facing a strange behaviour in PA.
I update a security through TI for an alternative hierarchy.
The process is very simple. It uses the following function to update security.

Code: Select all

 HierarchyElementSecurityPut(sElSecurity, pDim, pHierarchy, sElName, sGroup) ; 
Elements for which I am update security are 'C' level elements
Strangely it requires function to take effect of this update or else hierarchy is not accessible to user.

Code: Select all

SecurityRefresh


I dont understand why it require a call to Security Refresh function when the }ElementSecurity cube does not have any rule?

I think I should mentioned this. There are two process which runs. The first one will recreate the hierarchy
and second process is called from epilog of the first, updates the security for this hierarchy.

Any help here ? I am missing anything about security on Hierarchy?

Regards,
Lav
lotsaram
MVP
Posts: 3702
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Hierarchy security update require a call to SecurityRefresh Function

Post by lotsaram »

I agree this sounds strange. If element security cubes don't contain rules then the ElementSecurityPut function should be sufficient to update security without needing a SecurityRefresh.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
MarenC
Regular Participant
Posts: 436
Joined: Sat Jun 08, 2019 9:55 am
OLAP Product: Planning Analytics
Version: Planning Analytics 2.0
Excel Version: Excel 2016

Re: Hierarchy security update require a call to SecurityRefresh Function

Post by MarenC »

Hi,

Do you have any cube or dimension security rules on the model?

Maren
User avatar
gtonkin
MVP
Posts: 1259
Joined: Thu May 06, 2010 3:03 pm
OLAP Product: TM1
Version: Latest and greatest
Excel Version: Office 365 64-bit
Location: JHB, South Africa
Contact:

Re: Hierarchy security update require a call to SecurityRefresh Function

Post by gtonkin »

Think I had something similar and ended up adding this along with the HierarchyElementSecurityPut statements iirc:

Code: Select all

#--Give Access to see a particular hierarchy in the dimension
CellPutS(sElSecurity, '}DimensionSecurity', pDim | ':' | pHierarchy,  sGroup);
BR, George.

Learn something new: MDX Views
lav4you
Posts: 52
Joined: Fri Jan 02, 2009 1:20 pm

Re: Hierarchy security update require a call to SecurityRefresh Function

Post by lav4you »

MarenC wrote: Thu Feb 09, 2023 1:20 pm Hi,

Do you have any cube or dimension security rules on the model?

Maren
No. no rule on any dimension or '}ElementSecurity' cube.
lav4you
Posts: 52
Joined: Fri Jan 02, 2009 1:20 pm

Re: Hierarchy security update require a call to SecurityRefresh Function

Post by lav4you »

gtonkin wrote: Thu Feb 09, 2023 2:22 pm Think I had something similar and ended up adding this along with the HierarchyElementSecurityPut statements iirc:

Code: Select all

#--Give Access to see a particular hierarchy in the dimension
CellPutS(sElSecurity, '}DimensionSecurity', pDim | ':' | pHierarchy,  sGroup);
I will give it a try and let you know
lav4you
Posts: 52
Joined: Fri Jan 02, 2009 1:20 pm

Re: Hierarchy security update require a call to SecurityRefresh Function

Post by lav4you »

I tried the CellPutS but the trick didnt work. :-(
lotsaram
MVP
Posts: 3702
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Hierarchy security update require a call to SecurityRefresh Function

Post by lotsaram »

lav4you wrote: Thu Feb 09, 2023 4:55 pm I tried the CellPutS but the trick didnt work. :-(
Maybe also try CellPutS to the element security cube. What George said rang a bell and I think I can recall needing to do this. (Why I don't know becasue AFAIK ElementSecurityPut should alone be adequate).

Code: Select all

HierarchyElementSecurityPut(sElSecurity, pDim, pHierarchy, sElName, sGroup);
CellPutS(sElSecurity, '}ElementSecurity_' | pDim, pHierarchy:sElName, sGroup);
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
Post Reply