Examples: IsAdminServer property
This agent sets "stormy" as the administration server for the current database.
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim acl As NotesACL
Dim acle As NotesACLEntry
Set db = session.CurrentDatabase
Set acl = db.ACL
REM See if there is an administration server
adminExists = False
Set acle = acl.GetFirstEntry
Do While Not(acle Is Nothing)
If acle.IsAdminServer Then
adminExists = True
Exit Do
End If
Set acle = acl.GetNextEntry(acle)
Loop
REM Remove current admin server if not stormy
If adminExists Then
If Instr(Lcase(acle.Name), "stormy") Then
Messagebox "Admin server is already stormy",, "All set"
Exit Sub
Else
acle.IsAdminServer = False
Call acle.Remove
End If
End If
REM Make stormy admin server
Set acle = acl.GetEntry("stormy/UNIX/Notes")
If acle Is Nothing Then
Set acle = acl.CreateACLEntry("stormy/UNIX/Notes", _
ACLLEVEL_MANAGER)
End If
acle.IsAdminServer = True
Call acl.Save
End Sub