Simple annotation security model
You can implement basic security for the ViewONE Annotations Module by using the EDIT and VIEW annotation properties to define whether a user can edit, view, or print a particular annotation. You can also use the annotateEdit HTML parameter to disable the edit option for all annotations.
The annotations file is an ASCII text file with the optional .ant extension that lists the properties for all annotations in an image. You can implement annotation simple security through your servlet object that controls the content of the annotation file when it is served out to users.
By default, the EDIT annotation property is not included in the annotations file, and anyone can edit the annotations for that image. When a user creates and saves an annotation by using the user interface, the annotations file contains details about the annotation that do not include the EDIT property. That user has edit privileges for that annotation. When another user retrieves the annotation file without the EDIT property included, that user can edit that annotation.
However, the server object that serves up the annotation file can insert the EDIT property for any annotation. Setting this property to 0 (zero) prevents the user from editing that particular annotation. Setting this property to 1 allows the user to edit the annotation. You can set the property selectively for each annotation.
The same principle applies for the VIEW annotation property. By default, the VIEW annotation property is not included in the annotations file, and all users can view and print the annotation. Setting this property to 1 allows viewing of the annotation but not printing. Setting this property to 2 allows printing but not viewing. The default value is 3, allow viewing and printing the annotation.
To disable the edit option for all annotations, you can also use the annotateEdit HTML parameter in the HTML file that loads the viewer. This parameter is a global option that prevents the specified user from editing or modifying any annotation.