As far as Reader Access is concerned, my experience has taught me these rules :
1) Seperate access types and assign a field to each type
2) Always include a "super access", in case you have to recover from a mistake.
So, here comes the lengthy explanation. Bear with me - for your own good !
Notes is a great document management system. Reader fields give an enormous amount of flexibility, and are very powerful in defining groupes of people who can access a document.
There are very good reasons to use Reader fields. Limiting access to client profile documents, preventing users from viewing other users HR information, or simply preventing a document from being accessed before it has been approved for publication.
All these scenarios are quite common, and Reader fields are what makes them possible.
The Reader field is quite simple to understand : if it exists and is not empty, then only the users listed in it have access to the document.
But there is one little detail : ONLY those users listed in it have access !
Indeed, Notes is a unique system in that it is the only existing system that can COMPLETELY LOCK OUT everyone INCLUDING the administrator ! No user has default access to all documents - not even the server !
So, when implementing ANY kind of reader access, you need to ALWAYS include a reader field with "LocalDomainServers", as well as ANOTHER field, a "super-access" field, in addition to the normal working fields (the ones giving reader access to the users that need it). Now, following the sensitivity of the users, the super-access field can have different types of definitions :
- If the information is not of the HR kind, nor top-secret-company-confidential-code-red stuff, then the super-access field can simply hold the Administrator groupe, or any other groupe name dedicated to high-level technical tasks (ie users who have a clue and are reliable).
- If the information is more sensitive and should not bear a default "back door", then you can put a role name in there - without creating the corresponding role in the ACL. So, the access will be there, but only the db manager will, in effect, be allowed to create and assign the role if and when the need arises, deleting it when the job is finished.
- If the data is really top secret, then assign a non-existing user name, like Super Man or something. Document this feature and have the users - or client - agree to it. The advantage of this is that as long as the administrator has not created the corresponding ID, the access is useless. And it should be easy to set up a protocol requiring at least one managerial approval before the admin is allowed to create that specific ID file - which can obviously be destroyed after use.
With these precautions, your form should therefor contain :
1 server access Reader field
1 emergency access Reader field
1 (or more) normal function Reader field
Why more than 1 "normal function" Reader field ? Say the application requires the original author of the document to retain access to the document throughout the life of the document, but he must lose Editor access to it after a certain status. Typical example would be a Vacation Request - the author creates it, but once it is submitted for approval, he should obviously not be able to modify it. Yet, he needs to know if it has been approved or not.
In this kind of situation, we have an author and an approver, but we also have the HR department that needs to know (yet has no authority to approve or refuse the request).
In this case, I would have a Reader field get the name of the author on creation, and a Reader field with HR access. The approver would obviously be in an Author field.
Of course, for documents that are public before/after being private, the server access and emergency access fields need to be empty when the document needs to be public (as do all other Reader fields).
That means that you, as developer, must think of controlling the status of these fields in the functions that change the public/private status of the document. it all depends on the workflow that has been defined, so I cannot list all possible configurations.
But one thing is sure : if you do not correctly manage your Reader fields, then one day the documents will fall prey to the Exclusion Syndrome. Everyone knows the document was there, but NOBODY can see it because there is a Reader field in there that was incorrectly set, and no backup access to correct the situation.
And there is NO WAY to recover from that if you have not followed the rules above.
Pascal.