From e06aa0a286b80d5d5b76e20d1b18799c4b1586e6 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sun, 15 Oct 2023 10:30:06 +0200 Subject: [PATCH] do not list hidden users as recipient or revisor --- inc/inc.ClassSettings.php | 2 ++ out/out.SetRecipients.php | 1 + out/out.SetRevisors.php | 1 + views/bootstrap/class.SetRecipients.php | 2 ++ views/bootstrap/class.SetRevisors.php | 2 ++ 5 files changed, 8 insertions(+) diff --git a/inc/inc.ClassSettings.php b/inc/inc.ClassSettings.php index 51ddd472b..557a35f3d 100644 --- a/inc/inc.ClassSettings.php +++ b/inc/inc.ClassSettings.php @@ -192,6 +192,8 @@ class Settings { /* {{{ */ var $_enableRemoveRevApp = false; // enable/disable listing logged in user as recipient var $_enableSelfReceipt = false; + // enable/disable hidden user as recipient + var $_enableHiddenReceipt = false; // enable/disable update of a receipt by the recipient var $_enableUpdateReceipt = false; // enable/disable listing administrator as recipient diff --git a/out/out.SetRecipients.php b/out/out.SetRecipients.php index 986ec4315..6bee9e9d2 100644 --- a/out/out.SetRecipients.php +++ b/out/out.SetRecipients.php @@ -71,6 +71,7 @@ if($view) { $view->setParam('version', $content); $view->setParam('enableownerreceipt', $settings->_enableOwnerReceipt); $view->setParam('enableadminreceipt', $settings->_enableAdminReceipt); + $view->setParam('enablehiddenreceipt', $settings->_enableHiddenReceipt); $view->setParam('accessobject', $accessop); $view($_GET); exit; diff --git a/out/out.SetRevisors.php b/out/out.SetRevisors.php index bbd4c87d2..956c04f03 100644 --- a/out/out.SetRevisors.php +++ b/out/out.SetRevisors.php @@ -72,6 +72,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/views/bootstrap/class.SetRecipients.php b/views/bootstrap/class.SetRecipients.php index fd450cf9a..bf8998c76 100644 --- a/views/bootstrap/class.SetRecipients.php +++ b/views/bootstrap/class.SetRecipients.php @@ -39,6 +39,7 @@ class SeedDMS_View_SetRecipients extends SeedDMS_Theme_Style { $content = $this->params['version']; $enableownerreceipt = $this->params['enableownerreceipt']; $enableadminreceipt = $this->params['enableadminreceipt']; + $enablehiddenreceipt = $this->params['enablehiddenreceipt']; $overallStatus = $content->getStatus(); @@ -89,6 +90,7 @@ class SeedDMS_View_SetRecipients extends SeedDMS_Theme_Style { break; } } else { + if(!$enablehiddenreceipt && $usr->isHidden()) continue; $options[] = array($usr->getID(), htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName())); } } diff --git a/views/bootstrap/class.SetRevisors.php b/views/bootstrap/class.SetRevisors.php index a18f856f0..fc7f965c9 100644 --- a/views/bootstrap/class.SetRevisors.php +++ b/views/bootstrap/class.SetRevisors.php @@ -40,6 +40,7 @@ class SeedDMS_View_SetRevisors extends SeedDMS_Theme_Style { $enableadminrevapp = $this->params['enableadminrevapp']; $enableownerrevapp = $this->params['enableownerrevapp']; $enableselfrevapp = $this->params['enableselfrevapp']; + $enablehiddenrevapp = $this->params['enablehiddenrevapp']; $overallStatus = $content->getStatus(); @@ -103,6 +104,7 @@ class SeedDMS_View_SetRevisors extends SeedDMS_Theme_Style { } } else { if (!$enableselfrevapp && $usr->getID()==$user->getID()) continue; + if(!$enablehiddenrevapp && $usr->isHidden()) continue; $options[] = array($usr->getID(), htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName())); } }