Troubleshooting
Problem
The goal is to restrict the ability to annotate PDF documents in Daeja Professional based on the user membership to a group. The user must be able to view existing annotations made by others.
Symptom
We can assign the user rights to annotate in FileNet where Annotations cannot be saved into the repository. The issue is that the Daeja viewer allows the users to draw or add text on top of the document even though the changes that are made cannot be saved. We need to give the user the ability to see annotations made by others, but not make markups to the document.
Cause
The annotation tool bar should be hidden to restrict edits.
Environment
Windows
Daeja Viewer 4.1.3
Content Navigator 2.0.3
Diagnosing The Problem
Create a specific user in windows environment who shouldn't be given privilege to annotate. Login with that user into FileNet Content Navigator. The user should be able to open any document to annotate. The user still must be able to view existing annotations made by others. The user should not be able to create any annotations.
Resolving The Problem
ICN 2.0.3.3 provides a way to do this via plugin, by adding a response filter to the getViewoneBootstrap service. The implemented response filter would filter the service - "/p8/getViewoneBootstrap", and in the implementation of the filter call, it would cast the jsonResponse to JSONViewoneBootstrapResponse, and could then adjust any of the Daeja parameters for that invocation of the viewer. This works for both ViewONE Virtual and ViewONE Pro.
Example:
public class V1BootstrapFresponseFilter extends PluginResponseFilter {
@Override
public String[] getFilteredServices() {
return new String[] { "/p8/getViewoneBootstrap" };
}
@Override
public void filter(String serverType, PluginServiceCallbacks
callbacks, HttpServletRequest request, JSONObject jsonResponse) throws
Exception {
PluginLogger logger = callbacks.getLogger();
String methodName = "filter";
logger.logEntry(this, methodName);
if ( jsonResponse instanceof JSONViewoneBootstrapResponse ) {
logger.logDebug(this, methodName, "Found instanceof J
SONViewoneBootstrapResponse");
JSONViewoneBootstrapResponse jvbr =
(JSONViewoneBootstrapResponse)jsonResponse;
// ... retrieve current user/group information, and set -
for example:
jvbr.setViewOneParameter("annotateEdit", value);
}
logger.logExit(this, methodName);
}
}
Was this topic helpful?
Document Information
Modified date:
17 June 2018
UID
swg21883846