From 1480098b5ef48e0a029e2147cf2a65b7809b0601 Mon Sep 17 00:00:00 2001 From: Yagami <976204163@qq.com> Date: Fri, 30 Oct 2020 11:00:02 +0800 Subject: [PATCH] * Fix priv. --- module/common/lang/zh-cn.php | 4 ++-- module/user/model.php | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index e52bd507cf..3c6308c27d 100755 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -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,'); diff --git a/module/user/model.php b/module/user/model.php index 9be09e02ce..d36b771d97 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -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; }