diff --git a/views/bootstrap/class.UpdateDocument.php b/views/bootstrap/class.UpdateDocument.php index ca33a7a81..ab25b46c6 100644 --- a/views/bootstrap/class.UpdateDocument.php +++ b/views/bootstrap/class.UpdateDocument.php @@ -38,6 +38,9 @@ class SeedDMS_View_UpdateDocument extends SeedDMS_Bootstrap_Style { $document = $this->params['document']; $strictformcheck = $this->params['strictformcheck']; $enablelargefileupload = $this->params['enablelargefileupload']; + $enableadminrevapp = $this->params['enableadminrevapp']; + $enableownerrevapp = $this->params['enableownerrevapp']; + $enableselfrevapp = $this->params['enableselfrevapp']; $dropfolderdir = $this->params['dropfolderdir']; $workflowmode = $this->params['workflowmode']; $documentid = $document->getId(); @@ -163,7 +166,7 @@ function checkForm() if($workflowmode == 'traditional') { // Retrieve a list of all users and groups that have review / approve // privileges. - $docAccess = $document->getReadAccessList(); + $docAccess = $folder->getReadAccessList($enableadminrevapp, $enableownerrevapp); ?> @@ -179,7 +182,7 @@ function checkForm() getMandatoryReviewers(); foreach ($docAccess["users"] as $usr) { - if ($usr->getID()==$user->getID()) continue; + if (!$enableselfrevapp && $usr->getID()==$user->getID()) continue; $mandatory=false; foreach ($res as $r) if ($r['reviewerUserID']==$usr->getID()) $mandatory=true; @@ -222,7 +225,7 @@ function checkForm() getMandatoryApprovers(); foreach ($docAccess["users"] as $usr) { - if ($usr->getID()==$user->getID()) continue; + if (!$enableselfrevapp && $usr->getID()==$user->getID()) continue; $mandatory=false; foreach ($res as $r) if ($r['approverUserID']==$usr->getID()) $mandatory=true;