Merge branch 'sprint/tianshujie_bug17280' into 'master'
Sprint/tianshujie bug17280 See merge request easycorp/zentaopms!2902
This commit is contained in:
@@ -45,7 +45,7 @@ js::set('productID' , $bug->product);
|
||||
<td id='newBuildExecutionBox' class='hidden'>
|
||||
<div class='input-group'>
|
||||
<span class='input-group-addon'><?php echo (!empty($execution) and $execution->type == 'kanban') ? $lang->bug->kanban : $lang->build->execution;?></span>
|
||||
<?php echo html::select('buildExecution', $executions, '', "class='form-control chosen'");?>
|
||||
<?php echo html::select('buildExecution', $executions, $bug->execution, "class='form-control chosen'");?>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
@@ -396,23 +396,6 @@ class groupModel extends model
|
||||
}
|
||||
$actions['actions'] = $dynamic;
|
||||
|
||||
/* Update whitelist. */
|
||||
$this->loadModel('personnel');
|
||||
$users = $this->getUserPairs($groupID);
|
||||
$users = array_keys($users);
|
||||
$objectTypes = array_reverse($this->config->group->acl->objectTypes); //Adjust the order of object types, because execution is subordinate to the whitelist of projects, as well as products to programs.
|
||||
|
||||
foreach($objectTypes as $key => $objectType)
|
||||
{
|
||||
$oldAcls = isset($oldGroup->acl[$key]) ? $oldGroup->acl[$key] : array();
|
||||
$newAcls = isset($actions[$key]) ? $actions[$key] : array();
|
||||
$needRemoveAcls = array_diff($oldAcls, $newAcls);
|
||||
$needAddAcls = array_diff($newAcls, $oldAcls);
|
||||
foreach($needAddAcls as $objectID) $this->personnel->updateWhitelist($users, $objectType, $objectID, 'whitelist', 'sync', 'increase');
|
||||
foreach($needRemoveAcls as $objectID) $this->personnel->deleteWhitelist($users, $objectType, $objectID, $groupID);
|
||||
}
|
||||
|
||||
|
||||
$actions = empty($actions) ? '' : json_encode($actions);
|
||||
$this->dao->update(TABLE_GROUP)->set('acl')->eq($actions)->where('id')->eq($groupID)->exec();
|
||||
return dao::isError() ? false : true;
|
||||
@@ -473,19 +456,6 @@ class groupModel extends model
|
||||
$acl = $this->dao->select('acl')->from(TABLE_GROUP)->where('id')->eq($groupID)->fetch('acl');
|
||||
$acl = json_decode($acl);
|
||||
|
||||
$this->loadModel('personnel');
|
||||
$objectTypes = array_reverse($this->config->group->acl->objectTypes); //Adjust the order of object types, because execution is subordinate to the whitelist of projects, as well as products to programs.
|
||||
|
||||
foreach($objectTypes as $key => $objectType)
|
||||
{
|
||||
if(!isset($acl->{$key})) continue;
|
||||
foreach($acl->{$key} as $objectID)
|
||||
{
|
||||
$this->personnel->updateWhitelist($newUsers, $objectType, $objectID, 'whitelist', 'sync', 'increase');
|
||||
$this->personnel->deleteWhitelist($delUsers, $objectType, $objectID, $groupID);
|
||||
}
|
||||
}
|
||||
|
||||
/* Adjust user view. */
|
||||
$changedUsers = array_merge($newUsers, $delUsers);
|
||||
if(!empty($changedUsers))
|
||||
|
||||
@@ -684,7 +684,7 @@ class testcaseModel extends model
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function update($caseID, $testtasks = '')
|
||||
public function update($caseID, $testtasks = array())
|
||||
{
|
||||
$now = helper::now();
|
||||
$oldCase = $this->getById($caseID);
|
||||
@@ -897,7 +897,7 @@ class testcaseModel extends model
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function batchUpdate($testtasks = '')
|
||||
public function batchUpdate($testtasks = array())
|
||||
{
|
||||
$cases = array();
|
||||
$allChanges = array();
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
if(isset($menuItem->hidden)) continue;
|
||||
$menuType = $menuItem->name;
|
||||
if(!$config->testcase->needReview and empty($config->testcase->forceReview) and $menuType == 'wait') continue;
|
||||
if($hasBrowsePriv and $menuType == 'QUERY')
|
||||
if($hasBrowsePriv and $menuType == 'QUERY' and in_array($browseType, array('all', 'needconfirm', 'bysuite')))
|
||||
{
|
||||
$searchBrowseLink = $this->createLink($currentModule, $currentMethod, $projectParam . "productID=$productID&branch=$branch&browseType=bySearch¶m=%s");
|
||||
$isBySearch = $browseType == 'bysearch';
|
||||
|
||||
@@ -82,7 +82,7 @@ $(function()
|
||||
<td><?php echo html::input("title[$key]", htmlSpecialString($case->title, ENT_QUOTES), "class='form-control'")?></td>
|
||||
<td style='overflow:visible'>
|
||||
<?php $caseModules = (isset($case->branch) and $case->branch != 0) ? $modules[BRANCH_MAIN] + $modules[$case->branch] : $modules[BRANCH_MAIN];?>
|
||||
<?php echo html::select("module[$key]", $caseModules, isset($case->module) ? $case->module : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->module : ''), "class='form-control chosen moduleChange' onchange='loadStories($case->product, this.value, $key)'")?>
|
||||
<?php echo html::select("module[$key]", $caseModules, isset($case->module) ? $case->module : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->module : ''), "class='form-control chosen moduleChange' onchange='loadStories($productID, this.value, $key)'")?>
|
||||
</td>
|
||||
<td style='overflow:visible'>
|
||||
<?php $storyID = isset($case->story) ? $case->story : ((!empty($case->id) and isset($cases[$case->id])) ? $cases[$case->id]->story : '');?>
|
||||
|
||||
Reference in New Issue
Block a user