From 1ab465d4d7a567107a0a5f81da4af06fd299ddbc Mon Sep 17 00:00:00 2001 From: leiyong <1549684884@qq.com> Date: Thu, 29 Oct 2020 11:37:09 +0800 Subject: [PATCH] * Modify upgrade whitelist. --- db/update20.0.sql | 1 - db/zentao.sql | 5 ++--- module/group/model.php | 7 ++++--- module/project/control.php | 1 - module/project/view/view.html.php | 8 -------- 5 files changed, 6 insertions(+), 16 deletions(-) diff --git a/db/update20.0.sql b/db/update20.0.sql index aa979ca17e..842490bedc 100644 --- a/db/update20.0.sql +++ b/db/update20.0.sql @@ -352,6 +352,5 @@ CREATE TABLE IF NOT EXISTS `zt_acl` ( `objectID` mediumint(9) NOT NULL DEFAULT '0', `type` char(40) NOT NULL DEFAULT 'whitelist', `source` char(30) NOT NULL, - `desc` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; diff --git a/db/zentao.sql b/db/zentao.sql index 9519320272..c0ca828994 100644 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -1,12 +1,11 @@ --- DROP TABLE IF EXISTS `zt_acllist`; -CREATE TABLE IF NOT EXISTS `zt_acllist` ( +-- DROP TABLE IF EXISTS `zt_acl`; +CREATE TABLE IF NOT EXISTS `zt_acl` ( `id` mediumint(9) NOT NULL AUTO_INCREMENT, `account` char(30) NOT NULL, `objectType` char(30) NOT NULL, `objectID` mediumint(9) NOT NULL DEFAULT '0', `type` char(40) NOT NULL DEFAULT 'whitelist', `source` char(30) NOT NULL, - `desc` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; diff --git a/module/group/model.php b/module/group/model.php index b43ca08b6a..ed281b5bdc 100644 --- a/module/group/model.php +++ b/module/group/model.php @@ -156,13 +156,14 @@ class groupModel extends model /** * Get the account number in the group. * - * @param int $groupID + * @param array $groupIdList * @access public * @return array */ - public function getGroupAccounts($groupID = 0) + public function getGroupAccounts($groupIdList = array()) { - return $this->dao->select('account')->from(TABLE_USERGROUP)->where('group')->eq($groupIdList)->fetchPairs('account'); + if(empty($groupIdList)) return array(); + return $this->dao->select('account')->from(TABLE_USERGROUP)->where('group')->in($groupIdList)->fetchPairs('account'); } /** diff --git a/module/project/control.php b/module/project/control.php index 7d4136c6ca..d18c698269 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -1587,7 +1587,6 @@ class project extends control $this->view->products = $products; $this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), '', $linkedBranches); $this->view->planGroups = $this->project->getPlans($products); - $this->view->groups = $this->loadModel('group')->getPairs(); $this->view->actions = $this->loadModel('action')->getList('project', $projectID); $this->view->dynamics = $this->loadModel('action')->getDynamic('all', 'all', 'date_desc', $pager, 'all', $projectID); $this->view->users = $this->loadModel('user')->getPairs('noletter'); diff --git a/module/project/view/view.html.php b/module/project/view/view.html.php index c71dbecc69..f98df26d8b 100644 --- a/module/project/view/view.html.php +++ b/module/project/view/view.html.php @@ -281,14 +281,6 @@
project->aclList[$project->acl];?>
- acl == 'custom'):?> -- whitelist); - foreach($whitelist as $groupID) if(isset($groups[$groupID])) echo $groups[$groupID] . ' '; - ?> -
-