diff --git a/config/zentaopms.php b/config/zentaopms.php index f86b810f5b..4b8f72d147 100644 --- a/config/zentaopms.php +++ b/config/zentaopms.php @@ -280,5 +280,5 @@ $config->newFeatures = array('introduction', 'tutorial', 'youngBlueTheme'); /* Program privs.*/ $config->programPriv = new stdclass(); -$config->programPriv->scrum = array('product', 'story', 'productplan', 'release', 'projectrelease', 'project', 'task', 'build', 'qa', 'bug', 'testcase', 'testsuite', 'testreport', 'caselib', 'doc', 'report', 'repo', 'svn', 'git', 'search', 'tree', 'file', 'jenkins', 'gitlab', 'job', 'ci', 'branch'); -$config->programPriv->waterfall = $config->programPriv->scrum + array('workestimation', 'durationestimation', 'budget', 'programplan', 'review', 'reviewissue', 'weekly', 'milestone', 'design', 'issue', 'risk', 'auditplan', 'nc', 'cm', 'pssp'); +$config->programPriv->scrum = array('projectstory', 'projectrelease', 'project', 'build', 'bug', 'testcase', 'testreport', 'caselib', 'doc', 'repo', 'meeting'); +$config->programPriv->waterfall = array_merge($config->programPriv->scrum, array('workestimation', 'durationestimation', 'budget', 'programplan', 'review', 'reviewissue', 'weekly', 'milestone', 'design', 'issue', 'risk', 'opportunity', 'measrecord', 'auditplan', 'trainplan', 'gapanalysis', 'pssp')); diff --git a/module/project/config.php b/module/project/config.php index e28c1dbbec..0ef78e1687 100644 --- a/module/project/config.php +++ b/module/project/config.php @@ -110,3 +110,6 @@ $config->project->datatable->fieldList['actions']['fixed'] = 'right'; $config->project->datatable->fieldList['actions']['width'] = '180'; $config->project->datatable->fieldList['actions']['required'] = 'yes'; $config->project->datatable->fieldList['actions']['pri'] = '1'; + +$config->project->removePriv['project'] = array('browse', 'kanban', 'create', 'batchEdit', 'qa', 'updateOrder', 'createGuide', 'programTitle'); +$config->project->removePriv['doc'] = array('catalog', 'index'); diff --git a/module/project/control.php b/module/project/control.php index fc734a7fa0..6b4c14b330 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -1136,9 +1136,21 @@ class project extends control /* Unset not project privs. */ $project = $this->project->getByID($group->project); - foreach($this->lang->resource as $method => $label) + foreach($this->lang->resource as $module => $methods) { - if(!in_array($method, $this->config->programPriv->{$project->model})) unset($this->lang->resource->$method); + if(!in_array($module, $this->config->programPriv->{$project->model})) + { + unset($this->lang->resource->$module); + } + else + { + if($project->model == 'scrum' and $module == 'projectstory') $this->config->project->removePriv[$module][] = 'track'; + + foreach($methods as $method => $label) + { + if(isset($this->config->project->removePriv[$module]) and in_array($method, $this->config->project->removePriv[$module])) unset($this->lang->resource->$module->$method); + } + } } } diff --git a/module/project/view/managepriv.html.php b/module/project/view/managepriv.html.php index 6c8eae9057..c5b75fb85e 100644 --- a/module/project/view/managepriv.html.php +++ b/module/project/view/managepriv.html.php @@ -21,6 +21,7 @@ #mainMenu #groupName{line-height:33px; float: left} .checkbox-right{padding-left:0px !important;} +.thWidth {width: 160px;} td.menus {border-right: 0;padding-right: 0;width: 220px !important;} td.menus + td {border-left: 0;} .menus .checkbox-primary {float: left; width: 220px;}