Manage Learn to apply best practices and optimize your operations.

Make users give you access to mail files

Make users give you access to their mail files

What happens when you've forgotten to give the Admin group access to mail files, and you have 3000 or so to manipulate? Here's some code that goes into the Database Script/Post Open event, if you can wait for the user to close and reopen their mail (or if you really are in a hurry, in the Memo Post Open event.) I have the code in a library, but it works equally well in the actual event.

The code checks for the entry, the level of the entry, and the type of entry, in case a user is clever enough to make the Admin group a person type.

This is implemented through the mail template, and deployed through the Design task.

Sub SetNotesAdmin()
'dim db as the current file, the code runs in the context of the user.
'dim acl as NotesACL
'dim aclEntry as NotesACLEntry

If ( db.CurrentAccessLevel <> ACLLEVEL_MANAGER ) Then
   ' Don't do anything if this user doesn't have Mgr access

   Set acl = db.ACL
   Set entry = acl.GetEntry( "AdminGroup" )
   ' Check if Admin group is in the ACL
   If entry Is Nothing Then
   'Add the proper Admin group to ACL as Mgr
      Set entry = New NotesACLEntry ( acl, "AdminGroup", ACLLEVEL_MANAGER )
      Call acl.Save

   'Check to if the user has bumped down the access level for the Admin group

      If entry.Level <> ACLLEVEL_MANAGER Then
      Call acl.Save
      End If 

      If entry.UserType <> ACLTYPE_PERSON_GROUP Then
      Call acl.Save
      End If
   End If 
End If
End Sub

Dig Deeper on Domino Resources - Part 6

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...