Gracias a Aristegui por enviármelo
Código para pasar la ACL de una BBDD a otra ( en un agente que se corre
manualmente, con la opción "Run once...") y el usuario tiene que tener acceso de gerente en las dos bases datos.
Sub Initialize
Dim db As New NotesDatabase( "Servidor", "Archivo1.nsf" )
Dim dbTarget As New NotesDatabase( "Servidor", "Archivo2.nsf" )
Dim acl As NotesACL
Dim aclTarget As NotesACL
Set acl = db.ACL
Set aclTarget = dbTarget.ACL
Dim Entrada As NotesACLEntry
Dim Nombre As String
Set acl = db.ACL
Set Entrada = acl.GetFirstEntry
While Entrada Is Nothing = False
Nombre = Entrada.Name
Nivel = Entrada.Level
If Nombre <> "-Default-" Then
Role = Entrada.Roles
Dim Copia As New NotesACLEntry(aclTarget, Nombre, Nivel)
Forall r In Entrada.Roles
If Role(0) <> "" Then
Call Copia.EnableRole( r )
End If
End Forall
Call aclTarget.Save
End If
Set Entrada = acl.GetNextEntry( Entrada)
Wend
End Sub
|
Otros documentos de LotusScript
|