From a51e63ab5203782df86a4ea6f4a6e6f02418e2ad Mon Sep 17 00:00:00 2001 From: liugang Date: Mon, 19 Sep 2022 10:56:54 +0800 Subject: [PATCH] * Finish task #69005. --- config/zentaopms.php | 4 ++-- module/project/control.php | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/config/zentaopms.php b/config/zentaopms.php index 5e57c970f7..b7df6d3d76 100644 --- a/config/zentaopms.php +++ b/config/zentaopms.php @@ -394,7 +394,7 @@ $config->pipelineTypeList = array('gitlab', 'gogs', 'gitea', 'jenkins', 'sonarqu /* Program privs.*/ $config->programPriv = new stdclass(); -$config->programPriv->scrum = array('story', 'projectstory', 'projectrelease', 'project', 'execution', 'build', 'bug', 'testcase', 'testreport', 'doc', 'repo', 'meeting', 'stakeholder', 'testtask'); +$config->programPriv->scrum = array('story', 'requirement', 'productplan', 'tree', 'projectstory', 'projectrelease', 'project', 'execution', 'build', 'bug', 'testcase', 'testreport', 'doc', 'repo', 'meeting', 'stakeholder', 'testtask'); $config->programPriv->waterfall = array_merge($config->programPriv->scrum, array('task', 'workestimation', 'durationestimation', 'budget', 'programplan', 'review', 'reviewissue', 'weekly', 'cm', 'milestone', 'design', 'issue', 'risk', 'opportunity', 'measrecord', 'auditplan', 'trainplan', 'gapanalysis', 'pssp', 'researchplan', 'researchreport')); $config->waterfallModules = array('workestimation', 'durationestimation', 'budget', 'programplan', 'review', 'reviewissue', 'weekly', 'cm', 'milestone', 'design', 'opportunity', 'auditplan', 'trainplan', 'gapanalysis', 'pssp', 'researchplan', 'researchreport'); @@ -402,4 +402,4 @@ $config->waterfallModules = array('workestimation', 'durationestimation', 'budge $config->showMainMenu = true; $config->maxPriValue = '256'; -$config->importWhiteList = array('user', 'task', 'story', 'bug', 'testcase', 'feedback'); \ No newline at end of file +$config->importWhiteList = array('user', 'task', 'story', 'bug', 'testcase', 'feedback'); diff --git a/module/project/control.php b/module/project/control.php index 24b52366f5..cbddc8dcb7 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -1474,6 +1474,22 @@ class project extends control /* Unset not project privs. */ $project = $this->project->getByID($group->project); + if($project->hasProduct) + { + unset($this->lang->resource->requirement); + unset($this->lang->resource->productplan); + unset($this->lang->resource->tree); + } + else + { + $this->lang->productplan->common = $this->lang->productplan->plan; + unset($this->lang->resource->project->manageProducts); + unset($this->lang->resource->tree->browseTask); + unset($this->lang->resource->tree->browsehost); + unset($this->lang->resource->tree->editHost); + unset($this->lang->resource->tree->fix); + } + if($project->model == 'waterfall') unset($this->lang->resource->productplan); foreach($this->lang->resource as $module => $methods) { if(!in_array($module, $this->config->programPriv->{$project->model}))