I was wondering if anyone is famliar with or has used any of the processes that you can download from BedrockTM1. Specifically speaking, the process called "Bedrock.Security.Group.Create" - It will create one of more security groups and add it to the server.
I was really excited to use this because I have 870 groups that I need to add. And, it added them just fine. However, it's not validating the groups I have added against our LDAP. So, for example, I can add a group named "JIM" and it will create it/add it without error. But, it's not a valid group. It doesn't have a CAM ID associated with it.
So, while I have added all these groups sucessfully, because they aren't validated (or official) groups, when I go into the rights editor for an Application (formerly called Contributor), those groups do not show up in that list. The idea of adding all of these manually is painful so thought I would post and see if anyone else was familiar with this process or this scenario.
Also, we are using Mode 5 security.
I'll post the code as well as an FYI. Again, this was created by BedrockTm1 and was downloaded from their site. Thanks a lot for your help!!
Advanced tab: (three parameters: pGroups, pDelimeter, and pDebug)
Prolog tab:
Code: Select all
#****Begin: Generated Statements***
#****End: Generated Statements****
#####################################################################################
##~~Copyright bedrocktm1.org 2011 www.bedrocktm1.org/how-to-licence.php Ver 2.0.2~~##
#####################################################################################
# This process will create client groups
# Notes:
# - Multiple groups can be specified seperated by a delimiter
# - If group already exists then the process will not attempt to re-create it
### Constants ###
cProcess = 'Bedrock.Security.Group.Create';
cTimeStamp = TimSt( Now, '\Y\m\d\h\i\s' );
sRandomInt = NumberToString( INT( RAND( ) * 100000 ));
cDebugFile = GetProcessErrorFileDirectory | cProcess | '.' | cTimeStamp | '.' | sRandomInt ;
### Initialise Debug ###
If( pDebug >= 1 );
# Set debug file name
sDebugFile = cDebugFile | 'Prolog.debug';
# Log start time
AsciiOutput( sDebugFile, 'Process Started: ' | TimSt( Now, '\d-\m-\Y \h:\i:\s' ) );
# Log parameters
AsciiOutput( sDebugFile, 'Parameters: pGroups: ' | pGroups );
AsciiOutput( sDebugFile, ' pDelimiter: ' | pDelimiter );
EndIf;
### Validate Parameters ###
nErrors = 0;
# If blank delimiter specified then convert to default
If( pDelimiter @= '' );
pDelimiter = '&';
EndIf;
# If no groups have been specified then terminate process
If( Trim( pGroups ) @= '' );
nErrors = 1;
sMessage = 'No groups specified';
If( pDebug >= 1 );
AsciiOutput( sDebugFile, sMessage );
EndIf;
ItemReject( sMessage );
EndIf;
### Split pGroups into individual groups and add ###
sGroups = pGroups;
nDelimiterIndex = 1;
While( nDelimiterIndex <> 0 );
nDelimiterIndex = Scan( pDelimiter, sGroups );
If( nDelimiterIndex = 0 );
sGroup = sGroups;
Else;
sGroup = Trim( SubSt( sGroups, 1, nDelimiterIndex - 1 ) );
sGroups = Trim( Subst( sGroups, nDelimiterIndex + Long(pDelimiter), Long( sGroups ) ) );
EndIf;
# Don't attempt to add a blank group
If( sGroup @<> '' );
If( DimIx( '}Groups', sGroup ) = 0 );
If( pDebug >= 1 );
AsciiOutput( sDebugFile, 'Group: ' | sGroup | ' OK' );
EndIf;
If( pDebug <= 1 );
AddGroup( sGroup );
EndIf;
Else;
If( pDebug >= 1 );
AsciiOutput( sDebugFile, 'Group: ' | sGroup | ' already exists' );
EndIf;
EndIf;
EndIf;
End;
If( pDebug <= 1 );
DimensionSortOrder( '}Groups', 'ByName', 'Ascending', 'ByName' , 'Ascending' );
EndIf;
### End Prolog ###
Code: Select all
#****Begin: Generated Statements***
#****End: Generated Statements****
#####################################################################################
##~~Copyright bedrocktm1.org 2011 www.bedrocktm1.org/how-to-licence.php Ver 2.0.2~~##
#####################################################################################
### Initialise Debug ###
If( pDebug >= 1 );
# Set debug file name
sDebugFile = cDebugFile | 'Epilog.debug';
# Log errors
If( nErrors <> 0 );
AsciiOutput( sDebugFile, 'Errors Occurred' );
EndIf;
# Log finish time
AsciiOutput( sDebugFile, 'Process Finished: ' | TimSt( Now, '\d-\m-\Y \h:\i:\s' ) );
EndIf;
### If errors occurred terminate process with a major error status ###
If( nErrors <> 0 );
ProcessQuit;
EndIf;
### End Epilog ###