Page 1 of 1

Hierarchy security update require a call to SecurityRefresh Function

Posted: Thu Feb 09, 2023 10:52 am
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

Re: Hierarchy security update require a call to SecurityRefresh Function

Posted: Thu Feb 09, 2023 12:48 pm
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.

Re: Hierarchy security update require a call to SecurityRefresh Function

Posted: Thu Feb 09, 2023 1:20 pm
by MarenC
Hi,

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

Maren

Re: Hierarchy security update require a call to SecurityRefresh Function

Posted: Thu Feb 09, 2023 2:22 pm
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);

Re: Hierarchy security update require a call to SecurityRefresh Function

Posted: Thu Feb 09, 2023 3:13 pm
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.

Re: Hierarchy security update require a call to SecurityRefresh Function

Posted: Thu Feb 09, 2023 3:14 pm
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

Re: Hierarchy security update require a call to SecurityRefresh Function

Posted: Thu Feb 09, 2023 4:55 pm
by lav4you
I tried the CellPutS but the trick didnt work. :-(

Re: Hierarchy security update require a call to SecurityRefresh Function

Posted: Thu Feb 09, 2023 5:26 pm
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);