diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php
index 18da0550f..25eb94581 100644
--- a/views/bootstrap/class.ViewDocument.php
+++ b/views/bootstrap/class.ViewDocument.php
@@ -439,7 +439,9 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
if(is_string($txt))
echo $txt;
$this->contentContainerEnd();
- $this->preview();
+ if($accessop->check_controller_access('ViewOnline', array('action'=>'run'))) {
+ $this->preview();
+ }
?>
@@ -580,51 +582,61 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
}
print "";
print "
";
- if($accessop->mayEditVersion($document)) {
- print "- ".$this->html_link('EditOnline', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("edit_version"), false, true)."
";
- }
+ if($this->check_access('EditOnline'))
+ if($accessop->mayEditVersion($document)) {
+ print "- ".$this->html_link('EditOnline', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("edit_version"), false, true)."
";
+ }
/* Only admin has the right to remove version in any case or a regular
* user if enableVersionDeletion is on
*/
- if($accessop->mayRemoveVersion($document)) {
- print "- ".$this->html_link('RemoveVersion', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("rm_version"), false, true)."
";
- }
- if($accessop->mayOverrideStatus($document)) {
- print "- ".$this->html_link('OverrideContentStatus', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("change_status"), false, true)."
";
- }
- if($accessop->maySetRecipients($document)) {
- print "- ".$this->html_link('SetRecipients', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("change_recipients"), false, true)."
";
- }
- if($accessop->maySetRevisors($document)) {
- print "- ".$this->html_link('SetRevisors', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("change_revisors"), false, true)."
";
- }
+ if($this->check_access('RemoveVersion'))
+ if($accessop->mayRemoveVersion($document)) {
+ print "- ".$this->html_link('RemoveVersion', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("rm_version"), false, true)."
";
+ }
+ if($this->check_access('OverrideContentStatus'))
+ if($accessop->mayOverrideStatus($document)) {
+ print "- ".$this->html_link('OverrideContentStatus', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("change_status"), false, true)."
";
+ }
+ if($this->check_access('SetRecipients'))
+ if($accessop->maySetRecipients($document)) {
+ print "- ".$this->html_link('SetRecipients', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("change_recipients"), false, true)."
";
+ }
+ if($this->check_access('SetRevisors'))
+ if($accessop->maySetRevisors($document)) {
+ print "- ".$this->html_link('SetRevisors', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("change_revisors"), false, true)."
";
+ }
if($workflowmode == 'traditional' || $workflowmode == 'traditional_only_approval') {
// Allow changing reviewers/approvals only if not reviewed
- if($accessop->maySetReviewersApprovers($document)) {
- print "- ".$this->html_link('SetReviewersApprovers', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("change_assignments"), false, true)."
";
- }
- } else {
- if($accessop->maySetWorkflow($document)) {
- if(!$workflow) {
- print "- ".$this->html_link('SetWorkflow', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("set_workflow"), false, true)."
";
+ if($this->check_access('SetReviewersApprovers'))
+ if($accessop->maySetReviewersApprovers($document)) {
+ print "- ".$this->html_link('SetReviewersApprovers', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("change_assignments"), false, true)."
";
+ }
+ } else {
+ if($this->check_access('SetWorkflow'))
+ if($accessop->maySetWorkflow($document)) {
+ if(!$workflow) {
+ print "- ".$this->html_link('SetWorkflow', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("set_workflow"), false, true)."
";
+ }
}
- }
}
/*
if($accessop->maySetExpires($document)) {
print "- ".$this->html_link('SetExpires', array('documentid'=>$documentid), array(), "".getMLText("set_expiry"), false, true)."
";
}
*/
- if($dms->getAllTransmittals($user)) {
- if($this->check_access('AddToTransmittal'))
- print "- ".$this->html_link('AddToTransmittal', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("add_to_transmittal"), false, true)."
";
- }
- if($accessop->mayEditComment($document)) {
- print "- ".$this->html_link('EditComment', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("edit_comment"), false, true)."
";
- }
- if($accessop->mayEditAttributes($document)) {
- print "- ".$this->html_link('EditAttributes', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("edit_attributes"), false, true)."
";
- }
+ if($this->check_access('AddToTransmittal'))
+ if($dms->getAllTransmittals($user)) {
+ if($this->check_access('AddToTransmittal'))
+ print "- ".$this->html_link('AddToTransmittal', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("add_to_transmittal"), false, true)."
";
+ }
+ if($this->check_access('EditComment'))
+ if($accessop->mayEditComment($document)) {
+ print "- ".$this->html_link('EditComment', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("edit_comment"), false, true)."
";
+ }
+ if($this->check_access('EditAttributes'))
+ if($accessop->mayEditAttributes($document)) {
+ print "- ".$this->html_link('EditAttributes', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("edit_attributes"), false, true)."
";
+ }
//print "- ".$this->html_link('Download', array('documentid'=>$documentid, 'vfile'=>1), array(), "".getMLText("versioning_info"), false, true)."
";