Is there any Method which could determine if user has access to document, meaning, user (or user group) exists in any of the Readers or Authors fields?
Example:
- we have User1
- we have NotesDocument in DB with docUNID, which has Readers/Authors fields, but User1 (and any of his groups) are not present in these fields.
User1 performs var doc = database.getDocumentByUNID(docUNID). Method getDocumentByUNID returns valid doc, but any Method like doc.getItemValueString() – returns empty values.
I see only manual method of deciding if user has access to document - take value of some standard field, like “form”, and if the value isEmpty() == true – user does not have access to the document.
doc.getItemValueString(“form”).isEmpty() == true – user has no access to document.