logger.config("Authorizing DocID: " + docId + " for user: "
+ user.get_Name());
// Check whether the search user is authorized to view document
// contents or
// not.
IDocument releasedVersion = versionSeries.get_ReleasedVersion();
Permissions permissions = new Permissions(
releasedVersion.get_Permissions(), releasedVersion.get_Owner());
if (permissions.authorize(user)) {
logger.log(Level.INFO, "As per the ACLS User "
+ user.get_Name()
+ " is authorized for document DocID " + docId);
authorizationResponse = new AuthorizationResponse(true,
docId);
if (checkMarkings) {
logger.log(Level.INFO, "Authorizing DocID: " + docId
+ " for user: " + user.get_Name()
+ " for Marking sets ");
// check whether current document has property values
// set for properties associated with marking sets or
// not //
if (releasedVersion.get_ActiveMarkings() != null) {
logger.log(Level.INFO, "Document has property associated with Markings set");
// check whether USER is authorized to view the
// document as per the Marking set security applied
// over it.
MarkingPermissions markingPermissions =
new MarkingPermissions(releasedVersion.get_ActiveMarkings());
if (markingPermissions.authorize(user)) {
logger.log(Level.INFO, "As per the Marking Sets User "
+ user.get_Name()
+ " is authorized for document DocID "
+ docId);