* Modify upgrade whitelist.

This commit is contained in:
leiyong
2020-10-29 11:37:09 +08:00
parent b8166b7b84
commit 1ab465d4d7
5 changed files with 6 additions and 16 deletions
-1
View File
@@ -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;
+2 -3
View File
@@ -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;
+4 -3
View File
@@ -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');
}
/**
-1
View File
@@ -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');
-8
View File
@@ -281,14 +281,6 @@
<div class="detail-title"><strong><?php echo $lang->project->acl;?></strong></div>
<div class="detail-content">
<p><?php echo $lang->project->aclList[$project->acl];?></p>
<?php if($project->acl == 'custom'):?>
<p>
<?php
$whitelist = explode(',', $project->whitelist);
foreach($whitelist as $groupID) if(isset($groups[$groupID])) echo $groups[$groupID] . '&nbsp;';
?>
</p>
<?php endif;?>
</div>
</div>
<?php $this->printExtendFields($project, 'div', "position=right&inForm=0&inCell=1");?>