From bfa1f3940d70ab7776a0d5e309b98e8e4c06c7df Mon Sep 17 00:00:00 2001 From: zhouxin Date: Mon, 14 Mar 2022 08:40:16 +0000 Subject: [PATCH] Fix bug #19818. --- config/zentaopms.php | 2 +- module/common/model.php | 2 ++ module/project/config.php | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/config/zentaopms.php b/config/zentaopms.php index 5f202f3f39..72c088fbf2 100644 --- a/config/zentaopms.php +++ b/config/zentaopms.php @@ -372,5 +372,5 @@ $config->newFeatures = array('introduction', 'tutorial', 'youngBlueTheme'); /* Program privs.*/ $config->programPriv = new stdclass(); -$config->programPriv->scrum = array('story', 'projectstory', 'projectrelease', 'project', 'build', 'bug', 'testcase', 'testreport', 'doc', 'repo', 'meeting', 'stakeholder', 'testtask'); +$config->programPriv->scrum = array('story', 'projectstory', 'projectrelease', 'project', 'execution', 'build', 'bug', 'testcase', 'testreport', 'doc', 'repo', 'meeting', 'stakeholder', 'testtask'); $config->programPriv->waterfall = array_merge($config->programPriv->scrum, array('workestimation', 'durationestimation', 'budget', 'programplan', 'review', 'reviewissue', 'weekly', 'cm', 'milestone', 'design', 'issue', 'risk', 'opportunity', 'measrecord', 'auditplan', 'trainplan', 'gapanalysis', 'pssp', 'researchplan', 'researchreport')); diff --git a/module/common/model.php b/module/common/model.php index 79b6b76e82..a09ee0e9fc 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -2196,6 +2196,8 @@ EOD; if(isset($this->app->user)) { + if(in_array($module, $this->config->programPriv->waterfall) and $this->app->tab == 'project') return true; + $this->app->user = $this->session->user; if(!commonModel::hasPriv($module, $method)) $this->deny($module, $method); } diff --git a/module/project/config.php b/module/project/config.php index 12d47f8cc9..4de782d212 100644 --- a/module/project/config.php +++ b/module/project/config.php @@ -133,6 +133,7 @@ $config->project->maxCheckList->scrum = array('bug', 'execution', 'build', ' $config->project->maxCheckList->waterfall = array('execution', 'design', 'doc', 'bug', 'case', 'build', 'release', 'testtask', 'review', 'build', 'researchplan', 'issue', 'risk', 'opportunity', 'auditplan', 'gapanalysis', 'meeting'); $config->project->excludedPriv['project'] = array('index', 'browse', 'kanban', 'create', 'batchEdit', 'qa', 'updateOrder', 'createGuide', 'programTitle', 'export'); +$config->project->excludedPriv['execution'] = array('view', 'browse', 'edit', 'batchedit', 'start', 'activate', 'putoff', 'suspend', 'close', 'delete', 'task', 'grouptask', 'importtask', 'importplanstories', 'importBug', 'story', 'build', 'testtask', 'testcase', 'bug', 'testreport', 'burn', 'computeBurn', 'fixFirst', 'burnData', 'team', 'doc', 'dynamic', 'manageProducts', 'manageMembers', 'unlinkMember', 'linkStory', 'unlinkStory', 'batchUnlinkStory', 'updateOrder', 'taskKanban', 'printKanban', 'tree', 'treeTask', 'treeStory', 'all', 'kanbanHideCols', 'kanbanColsColor', 'export', 'storyKanban', 'storySort', 'whitelist', 'addWhitelist', 'unbindWhitelist', 'storyEstimate', 'executionkanban', 'kanban'); $config->project->excludedPriv['story'] = array('report', 'linkStory', 'batchChangeBranch', 'batchChangeModule', 'batchToTask', 'processStoryChange', 'track', 'tasks', 'bugs', 'cases'); $config->project->excludedPriv['bug'] = array('browse', 'batchChangePlan', 'batchCreate', 'batchEdit', 'batchConfirm', 'batchResolve', 'batchClose', 'batchActivate', 'report', 'batchChangeModule', 'batchChangeBranch'); $config->project->excludedPriv['testcase'] = array('browse', 'batchChangeModule', 'batchChangeBranch');