I have a name in a field called dg_Remove, and I’m trying to remove the person’s name that is in this field from the acl. Here is the code I have so far:
Dim Workspace As New NotesUIWorkspace
Set uidoc = Workspace.currentdocument
Dim curDoc As NotesDocument
Set curDoc = uidoc.document
Dim entry As NotesACLEntry
Set entry = acl.GetEntry( curdoc.dg_Remove(0) )
Call entry.Remove
Call acl.Save
When I do this, the entry variable never sets, although the name in dg_Remove is there (and visible in the debugger.) I’m not sure how I trick it into seeing the value in dg_Remove as an ACL Entry.
When you step through this in the debugger is the entry properly set? The code basically looks OK to me. Working with the ACL in LS does have some problems.
We have developed Workflo!ACL Manager that basically allows you to modify the ACL of one or more selected ND Databases without having to open each individulally. For example you want to remove all occurances of a persons name from all databases on the server. Or add an Admin group to every DB in the Mail forlder. It also allows you to select a person or group and find out what rights they have to any/all databases.
Pretty neat tool that can save a lot of time and effort and reinventing the wheel. So for very little money you can save yourself a lot of time. Download a demo from our site at:
Subject: RE: Removing an Entry in the ACL with script
Looks like a cool tool, Bill. I’ll look into that for future administrative needs. Meanwhile, I need this code to work like yesterday (typical fashion). When I step thru the code, entry gets dimmed as a NotesACLEntry, but it’s blank. It should have been set by seeing the value in the dg_Remove field, but it just doesn’t see it, or resolve it.