Subject: ACL Group Changes
I don’t know if this is 100 percent error free but you might want to try this code:
Dim s As New NotesSession
Dim db as Notes Database
Dim acl As NotesACL
Dim e As NotesACLEntry
Dim firstPosStr as String
set db = s.current database
Set acl = db.ACL
Set e = acl.GetFirstEntry
Do Until e Is Nothing
furstPosStr = Left(e.Name,1)
If firstPosStr = “*” then then
'remove and replace * with &
Dim eLen as Integer
eLen = Len(e.name)
newName$ = Right(e.Name,eLen-1)
newName$ = “&” + newNameStr
'set new ACL entry with new name
Dim newAclName as New NotesACLEntry(acl,newName$,e.Level) 'this will put the
'newACLName in the existing ACL
newAclName.UserType = e.UserType
'now set the acl rights
newAclName. CanCreateDocuments = e.CanCreateDocuments
newAclName.CanDeleteDocuments= e.CanDeleteDocuments
newAclName.CanCreateLSOrJavaAgent= e.CanCreateLSOrJavaAgent
newAclName.CanCreatePersonalAgent = e.CanCreatePersonalAgent
newAclName.CanCreatePersonalFolder= e.CanCreatePersonalFolder
newAclName.CanReplicateOrCopyDocuments= e.CanReplicateOrCopyDocuments
newAclName.IsPublicWriter= e.IsPublicWriter
newAclName.IsPublicReader = e.IsPublicReader
'set the acl Roles
ForAll r in e.Roles
newAclName.IsRoleEnabled(r)=True
End If
Call acl.Save
Set e = acl.GetNextEntry(e)
Loop