From 34697b62bdc22a246040dcc2d6bac3c0cd641a74 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 13 Oct 2023 19:33:25 +0200 Subject: [PATCH] new config _enableHiddenRevApp (currently set to false) --- inc/inc.ClassSettings.php | 2 ++ out/out.AddDocument.php | 1 + out/out.SetReviewersApprovers.php | 1 + out/out.UpdateDocument.php | 1 + views/bootstrap/class.AddDocument.php | 3 +++ views/bootstrap/class.SetReviewersApprovers.php | 3 +++ views/bootstrap/class.UpdateDocument.php | 3 +++ 7 files changed, 14 insertions(+) diff --git a/inc/inc.ClassSettings.php b/inc/inc.ClassSettings.php index 74cd5a3e3..e97b8a8a7 100644 --- a/inc/inc.ClassSettings.php +++ b/inc/inc.ClassSettings.php @@ -176,6 +176,8 @@ class Settings { /* {{{ */ var $_enableOwnerRevApp = false; // enable/disable listing logged in user as reviewer/approver var $_enableSelfRevApp = false; + // enable/disable hidden user as reviewer/approver + var $_enableHiddenRevApp = false; // enable/disable update of a review/approval by the reviewer/approver var $_enableUpdateRevApp = false; // enable/disable removal of a review/approval by the admiistrator diff --git a/out/out.AddDocument.php b/out/out.AddDocument.php index 6bfc1c3c5..4f065ee2b 100644 --- a/out/out.AddDocument.php +++ b/out/out.AddDocument.php @@ -64,6 +64,7 @@ if($view) { $view->setParam('enableadminrevapp', $settings->_enableAdminRevApp); $view->setParam('enableownerrevapp', $settings->_enableOwnerRevApp); $view->setParam('enableselfrevapp', $settings->_enableSelfRevApp); + $view->setParam('enablehiddenrevapp', $settings->_enableHiddenRevApp); $view->setParam('dropfolderdir', $settings->_dropFolderDir); $view->setParam('dropfolderfile', isset($_REQUEST["dropfolderfileform1"]) ?$_REQUEST["dropfolderfileform1"] : ''); $view->setParam('workflowmode', $settings->_workflowMode); diff --git a/out/out.SetReviewersApprovers.php b/out/out.SetReviewersApprovers.php index f10350a59..b261cae0d 100644 --- a/out/out.SetReviewersApprovers.php +++ b/out/out.SetReviewersApprovers.php @@ -66,6 +66,7 @@ if($view) { $view->setParam('enableadminrevapp', $settings->_enableAdminRevApp); $view->setParam('enableownerrevapp', $settings->_enableOwnerRevApp); $view->setParam('enableselfrevapp', $settings->_enableSelfRevApp); + $view->setParam('enablehiddenrevapp', $settings->_enableHiddenRevApp); $view->setParam('accessobject', $accessop); $view($_GET); exit; diff --git a/out/out.UpdateDocument.php b/out/out.UpdateDocument.php index 47f2494d0..579984109 100644 --- a/out/out.UpdateDocument.php +++ b/out/out.UpdateDocument.php @@ -74,6 +74,7 @@ if($view) { $view->setParam('enableadminrevapp', $settings->_enableAdminRevApp); $view->setParam('enableownerrevapp', $settings->_enableOwnerRevApp); $view->setParam('enableselfrevapp', $settings->_enableSelfRevApp); + $view->setParam('enablehiddenrevapp', $settings->_enableHiddenRevApp); $view->setParam('dropfolderdir', $settings->_dropFolderDir); $view->setParam('workflowmode', $settings->_workflowMode); $view->setParam('presetexpiration', $settings->_presetExpirationDate); diff --git a/views/bootstrap/class.AddDocument.php b/views/bootstrap/class.AddDocument.php index 0fce83ffd..6787700bf 100644 --- a/views/bootstrap/class.AddDocument.php +++ b/views/bootstrap/class.AddDocument.php @@ -149,6 +149,7 @@ console.log(params); $enableadminrevapp = $this->params['enableadminrevapp']; $enableownerrevapp = $this->params['enableownerrevapp']; $enableselfrevapp = $this->params['enableselfrevapp']; + $enablehiddenrevapp = $this->params['enablehiddenrevapp']; $strictformcheck = $this->params['strictformcheck']; $nodocumentformfields = $this->params['nodocumentformfields']; $dropfolderdir = $this->params['dropfolderdir']; @@ -511,6 +512,7 @@ console.log(params); $options = array(); foreach ($docAccess["users"] as $usr) { + if(!$enablehiddenrevapp && $usr->isHidden()) continue; if (!$enableselfrevapp && $usr->getID()==$user->getID()) continue; $mandatory=false; foreach ($res as $r) if ($r['reviewerUserID']==$usr->getID()) $mandatory=true; @@ -612,6 +614,7 @@ console.log(params); $options = array(); foreach ($docAccess["users"] as $usr) { + if(!$enablehiddenrevapp && $usr->isHidden()) continue; if (!$enableselfrevapp && $usr->getID()==$user->getID()) continue; $mandatory=false; diff --git a/views/bootstrap/class.SetReviewersApprovers.php b/views/bootstrap/class.SetReviewersApprovers.php index b899b3ecb..6cb1162db 100644 --- a/views/bootstrap/class.SetReviewersApprovers.php +++ b/views/bootstrap/class.SetReviewersApprovers.php @@ -41,6 +41,7 @@ class SeedDMS_View_SetReviewersApprovers extends SeedDMS_Theme_Style { $enableadminrevapp = $this->params['enableadminrevapp']; $enableownerrevapp = $this->params['enableownerrevapp']; $enableselfrevapp = $this->params['enableselfrevapp']; + $enablehiddenrevapp = $this->params['enablehiddenrevapp']; $overallStatus = $content->getStatus(); $owner = $document->getOwner(); @@ -115,6 +116,7 @@ class SeedDMS_View_SetReviewersApprovers extends SeedDMS_Theme_Style { break; } } else { + if(!$enablehiddenrevapp && $usr->isHidden()) continue; if (!$enableselfrevapp && $usr->getID()==$user->getID()) continue; $options[] = array($usr->getID(), htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName())); } @@ -236,6 +238,7 @@ class SeedDMS_View_SetReviewersApprovers extends SeedDMS_Theme_Style { } } else { + if(!$enablehiddenrevapp && $usr->isHidden()) continue; if (!$enableselfrevapp && $usr->getID()==$user->getID()) continue; $options[] = array($usr->getID(), htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName())); } diff --git a/views/bootstrap/class.UpdateDocument.php b/views/bootstrap/class.UpdateDocument.php index b12e3fe66..45ffb4c2c 100644 --- a/views/bootstrap/class.UpdateDocument.php +++ b/views/bootstrap/class.UpdateDocument.php @@ -141,6 +141,7 @@ console.log(element); $enableadminrevapp = $this->params['enableadminrevapp']; $enableownerrevapp = $this->params['enableownerrevapp']; $enableselfrevapp = $this->params['enableselfrevapp']; + $enablehiddenrevapp = $this->params['enablehiddenrevapp']; $dropfolderdir = $this->params['dropfolderdir']; $workflowmode = $this->params['workflowmode']; $presetexpiration = $this->params['presetexpiration']; @@ -339,6 +340,7 @@ console.log(element); $res=$user->getMandatoryReviewers(); $options = array(); foreach ($docAccess["users"] as $usr) { + if(!$enablehiddenrevapp && $usr->isHidden()) continue; if (!$enableselfrevapp && $usr->getID()==$user->getID()) continue; $mandatory=false; foreach ($res as $r) if ($r['reviewerUserID']==$usr->getID()) $mandatory=true; @@ -491,6 +493,7 @@ console.log(element); $options = array(); $res=$user->getMandatoryApprovers(); foreach ($docAccess["users"] as $usr) { + if(!$enablehiddenrevapp && $usr->isHidden()) continue; if (!$enableselfrevapp && $usr->getID()==$user->getID()) continue; $mandatory=false;