質問

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:

  1. we have User1
  2. 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.

役に立ちましたか?

解決

Use doc.getUniversalID(). It should be empty if the user has no access to the document.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top