Writing to }ElementSecurity cubes - ADMIN

Post Reply
jyoung66
Posts: 24
Joined: Fri Aug 13, 2010 2:14 am
OLAP Product: TM1
Version: PAW 2 PAX
Excel Version: 2016

Writing to }ElementSecurity cubes - ADMIN

Post by jyoung66 » Thu Aug 29, 2013 4:10 am

Hi

I was recently replacing cube element security rules with TI processes, this is the first time I have done this.

I note that I kept getting errors when writing to ADMIN groups, the errors kept telling me that I was trying to write to a consolidated element (sorry, going off memory), and yet all elements in the }Groups dimension, including the ADMIN elements are strings.

And I couldn't seem to avoid the errors with the usual If(CellisUpdatable) thing

Any ideas?

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

Re: Writing to }ElementSecurity cubes - ADMIN

Post by lotsaram » Thu Aug 29, 2013 7:27 am

How are you writing to the }ElementSecurity_<dim> cubes, with CellPutS or with ElementSecurityPut? Since a specific function exists to get and set element security better to use it. Of course with cube security or cell security there's no other option but CellPutS ...

Also you might as well ItemSkip the groups ADMIN, DataAdmin & SecurityAdmin as security for these is built-in and can't be overwritten either via rules or entry to the security cubes.

Other than that please follow the posting guidelines and post your code otherwise any assistance is really just a stab in the dark.

jyoung66
Posts: 24
Joined: Fri Aug 13, 2010 2:14 am
OLAP Product: TM1
Version: PAW 2 PAX
Excel Version: 2016

Re: Writing to }ElementSecurity cubes - ADMIN

Post by jyoung66 » Fri Aug 30, 2013 12:32 am

Fair enough re the code, I was offsite when I posted and didnt have access

Here is my amended code; it now works thanks to your advice

I kept the CellPutS as I had created about 15 of these all based on the control cube as datasource and going back to change all of the processes to use dimension datasouce and ElementSecurityPut was all too much work, but I will know for next time

#Original rule
#[]=S:
#IF(
#SUBST(!}GROUPS,1,3) @= 'HR_',
#'WRITE',
#'NONE');

If(vGroup @= 'ADMIN' % vGroup @= 'DataAdmin' % vGroup @= 'SecurityAdmin');
ITEMSKIP;
EndIf;

If( SUBST(vGroup,1,3) @= 'HR_');
CellPutS('WRITE', sCubeName, vHR_CCSecurityList, vGroup);
Else;
CellPutS('NONE', sCubeName, vHR_CCSecurityList, vGroup);
EndIf;

Post Reply