What you are asking for is somewhat non-trival.
Database ACL. You need to determine the following.
- Name in the ACL list.
- Are they a person, server, group ?
- if they are a group you need to read the Names.nsf
- Do they have any roles?
Next you need to read every document in the database. In order to do this you will need the access rights to do so. So that would be reader access at least (if set on the document) as well as access to encrypted fields (again if set).
You can use the NotesNoteCollection class to iterate through design + documents.
http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/topic/com.ibm.designer.domino.main.doc/H_NOTESNOTECOLLECTION_CLASS.html
Checking the design will allow you to read the Forms and see if they have a readers field and what values are set. After that you can check documents if the setting is not static for the related Form.
On a side point. If you are trying to diagnose a particular user against an application, you can use the following notes.ini settings.
DEBUG_THREADID=1
DEBUG_SERVERACL=2
This will print out on the Domino console everytime an ACL request is made. It will print Who is requesting, what level they requesting, what levels they have and what access they were given.
The debug is very verbose though so should only be used for diagnosing an issue and disabling when done.