diff --git a/config/zentaopms.php b/config/zentaopms.php index 4a93062154..23b294e5d8 100644 --- a/config/zentaopms.php +++ b/config/zentaopms.php @@ -296,5 +296,5 @@ $config->newFeatures = array('introduction', 'tutorial', 'youngBlueTheme'); /* Program privs.*/ $config->programPriv = new stdclass(); -$config->programPriv->scrum = array('projectstory', 'projectrelease', 'project', 'build', 'bug', 'testcase', 'testreport', 'caselib', 'doc', 'repo', 'meeting', 'stakeholder'); +$config->programPriv->scrum = array('projectstory', 'projectrelease', 'project', 'build', 'bug', 'testcase', 'testreport', 'doc', 'repo', 'meeting', 'stakeholder'); $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/bug/view/view.html.php b/module/bug/view/view.html.php index d5e2d774f2..a1b8cedb05 100644 --- a/module/bug/view/view.html.php +++ b/module/bug/view/view.html.php @@ -289,7 +289,7 @@ story) echo html::a($this->createLink('story', 'view', "storyID=$bug->story", '', true), "#$bug->story $bug->storyTitle", '', "class='iframe' data-width='80%'"); - if($bug->storyStatus == 'active' and $bug->latestStoryVersion > $bug->storyVersion) + if($bug->storyStatus == 'active' and $bug->latestStoryVersion > $bug->storyVersion and common::hasPriv('bug', 'confirmStoryChange')) { echo "({$lang->story->changed} "; echo html::a($this->createLink('bug', 'confirmStoryChange', "bugID=$bug->id"), $lang->confirm, 'hiddenwin'); diff --git a/module/doc/model.php b/module/doc/model.php index c8f4be47ea..017e147ffd 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -1914,19 +1914,23 @@ class docModel extends model $html = ""; @@ -2580,7 +2584,7 @@ EOT; if($tab != 'doc') $this->loadModel($tab)->setMenu($objectID); $this->lang->TRActions = $this->buildCollectButton4Doc(); - $this->lang->TRActions .= common::hasPriv('doc', 'create') ? $this->buildCreateButton4Doc($type, $objectID, $libID) : ''; + $this->lang->TRActions .= $this->buildCreateButton4Doc($type, $objectID, $libID); return array($libs, $libID, $object, $objectID); } diff --git a/module/group/view/create.html.php b/module/group/view/create.html.php index 3a2a6837e6..d99539be7a 100644 --- a/module/group/view/create.html.php +++ b/module/group/view/create.html.php @@ -25,10 +25,12 @@ group->desc;?> + app->tab != 'project'):?> group->limited;?> + diff --git a/module/project/config.php b/module/project/config.php index 524a86f476..138dee274a 100644 --- a/module/project/config.php +++ b/module/project/config.php @@ -125,7 +125,11 @@ $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('index', 'browse', 'kanban', 'create', 'batchEdit', 'qa', 'updateOrder', 'createGuide', 'programTitle'); -$config->project->removePriv['bug'] = array('batchChangePlan'); -$config->project->removePriv['doc'] = array('catalog', 'index'); -$config->project->removePriv['auditplan'] = array('delete'); +$config->project->removePriv['project'] = array('index', 'browse', 'kanban', 'create', 'batchEdit', 'qa', 'updateOrder', 'createGuide', 'programTitle', 'export'); +$config->project->removePriv['bug'] = array('browse', 'batchChangePlan', 'batchCreate', 'batchEdit', 'batchConfirm', 'batchResolve', 'batchClose', 'batchActivate', 'report', 'batchChangeModule', 'batchChangeBranch'); +$config->project->removePriv['testcase'] = array('browse', 'batchChangeModule', 'batchChangeBranch'); +$config->project->removePriv['doc'] = array('catalog', 'index'); +$config->project->removePriv['repo'] = array('edit', 'delete', 'maintain', 'setRules'); +$config->project->removePriv['testreport'] = array('browse'); +$config->project->removePriv['auditplan'] = array('delete'); +if(!isset($config->maxVersion)) $config->project->removePriv['stakeholder'] = array('issue', 'viewIssue', 'userIssue'); diff --git a/module/project/model.php b/module/project/model.php index d1f2bb0a88..35fc6a2f4a 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -2079,8 +2079,8 @@ class projectModel extends model $this->lang->switcherMenu = $this->getSwitcher($objectID, $this->app->rawModule, $this->app->rawMethod); /* Reset project priv. */ - $moduleName = $this->app->getModuleName(); - $methodName = $this->app->getMethodName(); + $moduleName = $this->app->rawModule; + $methodName = $this->app->rawMethod; $this->loadModel('common')->resetProjectPriv($objectID); if(!$this->common->isOpenMethod($moduleName, $methodName) and !commonModel::hasPriv($moduleName, $methodName)) $this->common->deny($moduleName, $methodName, false); diff --git a/module/testtask/control.php b/module/testtask/control.php index 270bcfb5a8..5b23cb42f0 100644 --- a/module/testtask/control.php +++ b/module/testtask/control.php @@ -1325,6 +1325,8 @@ class testtask extends control */ public function results($runID, $caseID = 0, $version = 0) { + if($this->app->tab == 'project') $this->loadModel('project')->setMenu($this->session->project); + if($runID) { $case = $this->testtask->getRunById($runID)->case; diff --git a/module/testtask/view/results.html.php b/module/testtask/view/results.html.php index 73d95ad5ad..e20e688ea6 100644 --- a/module/testtask/view/results.html.php +++ b/module/testtask/view/results.html.php @@ -120,7 +120,7 @@ - caseResult == 'fail'):?> + caseResult == 'fail' and common::hasPriv('testcase', 'createBug')):?> testcase->createBug, "onclick='createBug(this)'", "btn btn-primary createBtn");?>