601,100
562,"NULL"
586,
585,
564,
565,"fiWGIwa_V]d:9cOl5w]I>U3X?aMv5OTG[f7A`0Xar?II9HcG0yxd3dH^D55q@XqQC?FOx[Y8?K;t]lPI>?i?3so6S?ej;9iynBq?kJ>UEt@mZGGwx^eLAm:oHau81Y`RgmSL?8NF4Nvl`uZqOnfDPzBnBr\m=OU2s_0Qmr>qmvvQ]j1i[^iqAqt4>]2qYccuB0G`rTyu"
559,0
593,
594,
595,
597,
598,
596,
800,
801,
566,0
567,","
588,"."
589,
568,""""
570,
571,
569,0
592,0
599,1000
560,5
pDimensions
pCubes
pSetting
pGroup
pProcesses
561,5
2
2
2
2
2
590,5
pDimensions,"Y"
pCubes,"Y"
pSetting,"READ"
pGroup,""
pProcesses,"Y"
637,5
pDimensions,Fix Dimensions
pCubes,Fix Cubes
pSetting,Setting
pGroup,Group (Blank for All)
pProcesses,Fix Processes
577,0
578,0
579,0
580,0
581,0
582,0
572,142

#****Begin: Generated Statements***
#****End: Generated Statements****

vGroupSize = DIMSIZ('}Groups');

vGroupIndex = 1;
while (vGroupIndex <= vGroupSize);
if (pGroup @= '');
vGroup = DIMNM('}Groups', vGroupIndex);
else;
vGroup = pGroup;
vGroupIndex = vGroupSize;
endif;

if (vGroup @<> 'admin' & vGroup @<> 'SecurityAdmin' & vGroup @<> 'DataAdmin');
if (vGroup @<> 'TM1 Planning Manager Admin');
vSetting = pSetting;
else;
vSetting = 'WRITE';
endif;

if (pDimensions @<> 'N');

vDimension = '}dimensions';
vCube = '}DimensionSecurity';
#
# verify whether or not the site is using dimension level security
#
vCubeExists = TABDIM(vCube, 1);
if (vCubeExists @<> '');
vSize = DIMSIZ(vDimension);
vIndex = 1;
while (vIndex <= vSize);
vObject = DIMNM(vDimension, vIndex);

if(subst(vObject, 1, 4) @= '}sm_');
CELLPUTS(vSetting, vCube, vObject, vGroup);
endif;
if(vObject @= '}appClientProperties');
CELLPUTS(vSetting, vCube, vObject, vGroup);
endif;
if(vObject @= '}Clients');
CELLPUTS(vSetting, vCube, vObject, vGroup);
endif;

vIndex = vIndex + 1;
end;

endif;
endif;

if (pCubes @<> 'N');

vDimension = '}cubes';
vCube = '}CubeSecurity';
#
# verify whether or not the site is using cube level security
#
vCubeExists = TABDIM(vCube, 1);
if (vCubeExists @<> '');
vSize = DIMSIZ(vDimension);
vIndex = 1;
while (vIndex <= vSize);
vObject = DIMNM(vDimension, vIndex);

if(subst(vObject, 1, 4) @= '}sm_');
CELLPUTS(vSetting, vCube, vObject, vGroup);
endif;
#GTD added element attachment cubes
if(subst(vObject, 1, 20) @= '}ElementAttachments_');
CELLPUTS('WRITE', vCube, vObject, vGroup);
endif;

if(vObject @= '}sm_client_properties');
CELLPUTS('WRITE', vCube, vObject, vGroup);
endif;
if(vObject @= '}appClientProperties');
CELLPUTS('WRITE', vCube, vObject, vGroup);
endif;


vIndex = vIndex + 1;
end;

endif;
endif;

if (pProcesses @<> 'N');

vDimension = '}processes';
vCube = '}ProcessSecurity';
#
# verify whether or not the site is using process level security
#
vCubeExists = TABDIM(vCube, 1);
if (vCubeExists @= '');
CUBECREATE('}ProcessSecurity', '}Processes', '}Groups');
vCubeExists = TABDIM(vCube, 1);
endif;
if (vCubeExists @<> '');
vSize = DIMSIZ(vDimension);
vIndex = 1;
while (vIndex <= vSize);
vObject = DIMNM(vDimension, vIndex);

if(subst(vObject, 1, 4) @= '}sm_');
CELLPUTS(vSetting, vCube, vObject, vGroup);
endif;

#added attachment TI
if(vObject @= '}Attachments_Create_Object');
CELLPUTS(vSetting, vCube, vObject, vGroup);
endif;
if(vObject @= '}Attachments_Element');
CELLPUTS(vSetting, vCube, vObject, vGroup);
endif;
if(vObject @= '}Attachments_Extender');
CELLPUTS(vSetting, vCube, vObject, vGroup);
endif;

vIndex = vIndex + 1;
end;

endif;
endif;

endif;

vGroupIndex = vGroupIndex + 1;
end;

#add source type to task attributes
vAddingSourceType = 0;
IF (DIMIX('}sm_control_task_attributes', 'source_type') = 0);
vAddingSourceType = 1;
DimensionElementInsert('}sm_control_task_attributes','','source_type','N');
DimensionElementComponentAdd('}sm_control_task_attributes', 'Template Attributes', 'source_type', 1);
DimensionElementComponentAdd('}sm_control_task_attributes', 'Text', 'source_type', 1);

DimensionElementInsert('}sm_control_attributes','','source_type','N');
ENDIF;
573,3

#****Begin: Generated Statements***
#****End: Generated Statements****
574,3

#****Begin: Generated Statements***
#****End: Generated Statements****
575,13

#****Begin: Generated Statements***
#****End: Generated Statements****

IF (vAddingSourceType = 1);

iSubsetSize=SubsetGetSize('}sm_control_attributes', 'sm_multi_task_attributes');
SubsetElementInsert('}sm_control_attributes', 'sm_multi_task_attributes', 'source_type',iSubsetSize);
iSubsetSize=SubsetGetSize('}sm_control_attributes', 'sm_task_attributes');
SubsetElementInsert('}sm_control_attributes', 'sm_task_attributes', 'source_type',iSubsetSize);
iSubsetSize=SubsetGetSize('}sm_control_attributes', 'sm_task_template_attributes');
SubsetElementInsert('}sm_control_attributes', 'sm_task_template_attributes', 'source_type', iSubsetSize);
ENDIF;
576,CubeAction=1511	DataAction=1503	CubeLogChanges=0	
638,1
804,0
1217,1
900,
901,
902,
903,
906,
907,
908,
904,0
905,0
909,0
911,
912,
913,
914,
915,
916,
917,1
918,1
919,0
920,50000
921,""
922,""
923,0
924,""
925,""
926,""
927,""
