diff --git a/views/bootstrap/class.ViewDocument.php b/views/bootstrap/class.ViewDocument.php index 81413bb27..0870d208e 100644 --- a/views/bootstrap/class.ViewDocument.php +++ b/views/bootstrap/class.ViewDocument.php @@ -650,30 +650,30 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { /* Only admin has the right to remove version in any case or a regular * user if enableVersionDeletion is on */ - if($this->check_access('RemoveVersion')) + if($accessop->check_controller_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->check_controller_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->check_controller_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->check_controller_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($this->check_access('SetReviewersApprovers')) + if($accessop->check_controller_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->check_controller_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)."
  • "; @@ -685,16 +685,16 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { print "
  • ".$this->html_link('SetExpires', array('documentid'=>$documentid), array(), "".getMLText("set_expiry"), false, true)."
  • "; } */ - if($this->check_access('AddToTransmittal')) + if($accessop->check_controller_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->check_controller_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->check_controller_access('EditAttributes')) if($accessop->mayEditAttributes($document)) { print "
  • ".$this->html_link('EditAttributes', array('documentid'=>$documentid, 'version'=>$latestContent->getVersion()), array(), "".getMLText("edit_attributes"), false, true)."
  • "; } @@ -1191,6 +1191,8 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { ?>
    ".getMLText('info_recipients_tab_not_released')."
    "; $this->contentContainerStart(); print "\n"; @@ -1279,7 +1281,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
    contentContainerEnd(); - if($user->isAdmin() || $user->getId() == $document->getOwner()->getId()) { + if($accessop->check_view_access('ViewDocument', array('action'=>'receptionBar'))/* $user->isAdmin() || $user->getId() == $document->getOwner()->getId()*/) { /* Do not count entries '-2' as they are removed userҕ */ $totalreceipts = $stat['-1'] + $stat['0'] + $stat['1']; ?> @@ -1507,7 +1509,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { if($accessop->mayRemoveVersion($document)) { print "
  • ".$this->html_link('RemoveVersion', array('documentid'=>$documentid, 'version'=>$version->getVersion()), array(), "".getMLText("rm_version"), false, true)."
  • "; } - if($this->check_access('AddToTransmittal')) + if($accessop->check_controller_access('AddToTransmittal')) print "
  • ".$this->html_link('AddToTransmittal', array('documentid'=>$documentid, 'version'=>$version->getVersion()), array(), "".getMLText("add_to_transmittal"), false, true)."
  • "; if($accessop->mayEditComment($document)) { print "
  • ".$this->html_link('EditComment', array('documentid'=>$documentid, 'version'=>$version->getVersion()), array(), "".getMLText("edit_comment"), false, true)."
  • "; @@ -1620,7 +1622,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style { } else printMLText("no_attached_files"); - if($this->check_access('AddFile')) { + if($accessop->check_controller_access('AddFile')) { if ($document->getAccessMode($user) >= M_READWRITE){ print "\n"; }