* Fix priv.

This commit is contained in:
Yagami
2020-10-30 11:00:02 +08:00
parent 055d52f45e
commit 1480098b5e
2 changed files with 17 additions and 2 deletions

View File

@@ -854,7 +854,7 @@ $lang->icons['score'] = 'tint';
$lang->menu = new stdclass();
$lang->menu->scrum = new stdclass();
$lang->menu->scrum->program = '仪表盘|program|index|';
$lang->menu->scrum->product = $lang->productCommon . '|product|index|locate=no';
//$lang->menu->scrum->product = $lang->productCommon . '|product|index|locate=no';
$lang->menu->scrum->project = "$lang->projectCommon|project|index|locate=no";
$lang->menu->scrum->doc = '文档|doc|index|';
$lang->menu->scrum->qa = '测试|qa|index';
@@ -866,7 +866,7 @@ $lang->menu->waterfall->programplan = array('link' => '计划|programplan|brows
$lang->menu->waterfall->project = array('link' => $lang->projectCommon . '|project|task|projectID={PROJECT}', 'subModule' => ',project,task,');
$lang->menu->waterfall->weekly = array('link' => '报告|weekly|index|program={PROGRAM}', 'subModule' => ',milestone,');
$lang->menu->waterfall->doc = array('link' => '文档|doc|index|program={PROGRAM}');
$lang->menu->waterfall->product = array('link' => '需求|product|browse|product={PRODUCT}', 'subModule' => ',story,');
//$lang->menu->waterfall->product = array('link' => '需求|product|browse|product={PRODUCT}', 'subModule' => ',story,');
$lang->menu->waterfall->design = '设计|design|browse|product={PRODUCT}';
$lang->menu->waterfall->ci = '代码|repo|browse|';
$lang->menu->waterfall->qa = array('link' => '测试|bug|browse|product={PRODUCT}', 'subModule' => ',testcase,testtask,testsuite,testreport,caselib,');

View File

@@ -2011,6 +2011,13 @@ class userModel extends model
}
}
/* Judge sprint auth. */
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();
if($parent->PM == $account || $parent->openedBy == $account) return true;
}
return false;
}
@@ -2093,6 +2100,14 @@ class userModel extends model
}
}
/* Judge sprint auth. */
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;
$users[$parent->PM] = $parent->PM;
}
return $users;
}