例: GetEntry method (NotesACL - LotusScript®)

  1. 次のスクリプトは、progwork.NSF の ACL から Kendra Bauer のエントリを取得します。
    Dim db As New NotesDatabase( "snapper", "progwork.nsf" )
    Dim acl As NotesACL
    Dim entry As NotesACLEntry
    Set acl = db.ACL
    Set entry = acl.GetEntry( "Kendra Bauer" )
  2. 次のスクリプトは、現在のデータベースで「Unknown」グループのエントリを取得します。そして、スクリプトは ACL と変更し、「Unknown」グループがデータベース内の文書を削除できないようにします。
    Dim session As New NotesSession
    Dim db As NotesDatabase
    Dim acl As NotesACL
    Dim entry As NotesACLEntry
    Set db = session.CurrentDatabase
    Set acl = db.ACL
    Set entry = acl.GetEntry( "Unknown" )
    If Not ( entry Is Nothing ) Then
      entry.CanDeleteDocuments = False
      Call acl.Save
    End If