* code for task #69248.
This commit is contained in:
@@ -1756,7 +1756,7 @@ class userModel extends model
|
||||
if($allProducts === null) $allProducts = $this->dao->select('id,PO,QD,RD,createdBy,acl,whitelist,program,createdBy')->from(TABLE_PRODUCT)->where('acl')->ne('open')->fetchAll('id');
|
||||
if($allProjects === null) $allProjects = $this->dao->select('id,PO,PM,QD,RD,acl,type,path,parent,openedBy')->from(TABLE_PROJECT)->where('acl')->ne('open')->andWhere('type')->eq('project')->fetchAll('id');
|
||||
if($allPrograms === null) $allPrograms = $this->dao->select('id,PO,PM,QD,RD,acl,type,path,parent,openedBy')->from(TABLE_PROGRAM)->where('acl')->ne('open')->andWhere('type')->eq('program')->fetchAll('id');
|
||||
if($allSprints === null) $allSprints = $this->dao->select('id,PO,PM,QD,RD,acl,project,path,parent,type,openedBy')->from(TABLE_PROJECT)->where('acl')->eq('private')->beginIF($this->config->systemMode == 'new')->andWhere('type')->in('sprint,stage,kanban')->fi()->fetchAll('id');
|
||||
if($allSprints === null) $allSprints = $this->dao->select('id,PO,PM,QD,RD,acl,project,path,parent,type,openedBy')->from(TABLE_PROJECT)->where('acl')->eq('private')->andWhere('type')->in('sprint,stage,kanban')->fetchAll('id');
|
||||
|
||||
/* Get admins. */
|
||||
$manageObjects = array();
|
||||
@@ -1938,8 +1938,7 @@ class userModel extends model
|
||||
$teamGroups = array();
|
||||
$stmt = $this->dao->select('root,account')->from(TABLE_TEAM)
|
||||
->where('1=1')
|
||||
->beginIF($this->config->systemMode == 'new')->andWhere('type')->eq('project')->fi()
|
||||
->beginIF($this->config->systemMode == 'classic')->andWhere('type')->eq('execution')->fi()
|
||||
->andWhere('type')->eq('project')
|
||||
->andWhere('root')->in(array_keys($projectProducts))
|
||||
->andWhere('root')->ne(0)
|
||||
->query();
|
||||
@@ -2057,8 +2056,8 @@ class userModel extends model
|
||||
/* Set opened sprints and stages into userview. */
|
||||
$openedSprints = $this->dao->select('id')->from(TABLE_PROJECT)
|
||||
->where('acl')->eq('open')
|
||||
->beginIF($this->config->systemMode == 'new')->andWhere('type')->in('sprint,stage,kanban')->fi()
|
||||
->beginIF($this->config->systemMode == 'new')->andWhere('project')->in($userView->projects)->fi()
|
||||
->andWhere('type')->in('sprint,stage,kanban')
|
||||
->andWhere('project')->in($userView->projects)
|
||||
->fetchAll('id');
|
||||
|
||||
$openedSprints = join(',', array_keys($openedSprints));
|
||||
@@ -2516,7 +2515,7 @@ class userModel extends model
|
||||
}
|
||||
|
||||
/* Judge sprint auth. */
|
||||
if(($project->type == 'sprint' or $project->type == 'stage' or $project->type == 'kanban') and $project->acl == 'private' and $this->config->systemMode == 'new')
|
||||
if(($project->type == 'sprint' or $project->type == 'stage' or $project->type == 'kanban') and $project->acl == 'private')
|
||||
{
|
||||
$parent = $this->dao->select('openedBy,PM')->from(TABLE_PROJECT)->where('id')->eq($project->project)->fetch();
|
||||
if(empty($parent)) return false;
|
||||
@@ -2611,7 +2610,7 @@ class userModel extends model
|
||||
}
|
||||
|
||||
/* Judge sprint auth. */
|
||||
if(($project->type == 'sprint' || $project->type == 'stage') && $project->acl == 'private' && $this->config->systemMode == 'new')
|
||||
if(($project->type == 'sprint' || $project->type == 'stage') && $project->acl == 'private')
|
||||
{
|
||||
$parent = $this->dao->select('openedBy,PM')->from(TABLE_PROJECT)->where('id')->eq($project->project)->fetch();
|
||||
$users[$parent->openedBy] = $parent->openedBy;
|
||||
|
||||
Reference in New Issue
Block a user