do not list hidden users as recipient or revisor

This commit is contained in:
Uwe Steinmann 2023-10-15 10:30:06 +02:00
parent 568718f023
commit e06aa0a286
5 changed files with 8 additions and 0 deletions

View File

@ -192,6 +192,8 @@ class Settings { /* {{{ */
var $_enableRemoveRevApp = false; var $_enableRemoveRevApp = false;
// enable/disable listing logged in user as recipient // enable/disable listing logged in user as recipient
var $_enableSelfReceipt = false; var $_enableSelfReceipt = false;
// enable/disable hidden user as recipient
var $_enableHiddenReceipt = false;
// enable/disable update of a receipt by the recipient // enable/disable update of a receipt by the recipient
var $_enableUpdateReceipt = false; var $_enableUpdateReceipt = false;
// enable/disable listing administrator as recipient // enable/disable listing administrator as recipient

View File

@ -71,6 +71,7 @@ if($view) {
$view->setParam('version', $content); $view->setParam('version', $content);
$view->setParam('enableownerreceipt', $settings->_enableOwnerReceipt); $view->setParam('enableownerreceipt', $settings->_enableOwnerReceipt);
$view->setParam('enableadminreceipt', $settings->_enableAdminReceipt); $view->setParam('enableadminreceipt', $settings->_enableAdminReceipt);
$view->setParam('enablehiddenreceipt', $settings->_enableHiddenReceipt);
$view->setParam('accessobject', $accessop); $view->setParam('accessobject', $accessop);
$view($_GET); $view($_GET);
exit; exit;

View File

@ -72,6 +72,7 @@ if($view) {
$view->setParam('enableadminrevapp', $settings->_enableAdminRevApp); $view->setParam('enableadminrevapp', $settings->_enableAdminRevApp);
$view->setParam('enableownerrevapp', $settings->_enableOwnerRevApp); $view->setParam('enableownerrevapp', $settings->_enableOwnerRevApp);
$view->setParam('enableselfrevapp', $settings->_enableSelfRevApp); $view->setParam('enableselfrevapp', $settings->_enableSelfRevApp);
$view->setParam('enablehiddenrevapp', $settings->_enableHiddenRevApp);
$view->setParam('accessobject', $accessop); $view->setParam('accessobject', $accessop);
$view($_GET); $view($_GET);
exit; exit;

View File

@ -39,6 +39,7 @@ class SeedDMS_View_SetRecipients extends SeedDMS_Theme_Style {
$content = $this->params['version']; $content = $this->params['version'];
$enableownerreceipt = $this->params['enableownerreceipt']; $enableownerreceipt = $this->params['enableownerreceipt'];
$enableadminreceipt = $this->params['enableadminreceipt']; $enableadminreceipt = $this->params['enableadminreceipt'];
$enablehiddenreceipt = $this->params['enablehiddenreceipt'];
$overallStatus = $content->getStatus(); $overallStatus = $content->getStatus();
@ -89,6 +90,7 @@ class SeedDMS_View_SetRecipients extends SeedDMS_Theme_Style {
break; break;
} }
} else { } else {
if(!$enablehiddenreceipt && $usr->isHidden()) continue;
$options[] = array($usr->getID(), htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName())); $options[] = array($usr->getID(), htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName()));
} }
} }

View File

@ -40,6 +40,7 @@ class SeedDMS_View_SetRevisors extends SeedDMS_Theme_Style {
$enableadminrevapp = $this->params['enableadminrevapp']; $enableadminrevapp = $this->params['enableadminrevapp'];
$enableownerrevapp = $this->params['enableownerrevapp']; $enableownerrevapp = $this->params['enableownerrevapp'];
$enableselfrevapp = $this->params['enableselfrevapp']; $enableselfrevapp = $this->params['enableselfrevapp'];
$enablehiddenrevapp = $this->params['enablehiddenrevapp'];
$overallStatus = $content->getStatus(); $overallStatus = $content->getStatus();
@ -103,6 +104,7 @@ class SeedDMS_View_SetRevisors extends SeedDMS_Theme_Style {
} }
} else { } else {
if (!$enableselfrevapp && $usr->getID()==$user->getID()) continue; if (!$enableselfrevapp && $usr->getID()==$user->getID()) continue;
if(!$enablehiddenrevapp && $usr->isHidden()) continue;
$options[] = array($usr->getID(), htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName())); $options[] = array($usr->getID(), htmlspecialchars($usr->getLogin() . " - ". $usr->getFullName()));
} }
} }