Remove consistent ACL flag
The following code for a button removes the flag and allows me to open the database with manager rights.



Download: IT Certifications 101
Inside this exclusive essential guide, our independent experts break down which IT certifications are worth your time and effort, and how to get started obtaining them to further your career— including specific certifications that any cloud or desktop pro should seriously consider.
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
You also agree that your personal information may be transferred and processed in the United States, and that you have read and agree to the Terms of Use and the Privacy Policy.
From time to time I receive databases that have enforce consistent ACL switched on.
The following code for a button removes the flag and allows me to open the database with manager rights.
Event (Declarations): Declare Function NSFDbOpen Lib "nnotes.dll" (Byval dbName As String, hDB As Long) As Integer Declare Function NSFDbClose Lib "nnotes.dll" (Byval hDB As Long) As Integer Declare Function NSFDbReadACL Lib "nnotes.dll" (Byval hDB As Long, hACL As Long) As Integer Declare Function ACLSetFlags Lib "nnotes.dll" (Byval hACL As Long, Byval Flags As Long ) As Integer Declare Function NSFDbStoreACL Lib "nnotes.dll" (Byval hDB As Long, Byval hACL As Long, Byval ObjectID As Long, Method As Long) As Integer Event Click: Dim hDB As Long, hACL As Long rc = NSFDbOpen("YourDatabase.nsf", hDB) rc = NSFDbReadACL(hDB, hACL) rc = ACLSetFlags(hACL, &h0) rc = NSFDbStoreACL(hDB, hACL, 0, 0) rc = NSFDbClose(hdb)
Start the conversation
0 comments