* Finish task#46543.
This commit is contained in:
@@ -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'));
|
||||
|
||||
@@ -289,7 +289,7 @@
|
||||
<td>
|
||||
<?php
|
||||
if($bug->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 "(<span class='warning'>{$lang->story->changed}</span> ";
|
||||
echo html::a($this->createLink('bug', 'confirmStoryChange', "bugID=$bug->id"), $lang->confirm, 'hiddenwin');
|
||||
|
||||
@@ -1914,6 +1914,9 @@ class docModel extends model
|
||||
$html = "<div class='dropdown' id='createDropdown'>";
|
||||
$html .= "<button class='btn btn-primary' type='button' data-toggle='dropdown'><i class='icon icon-plus'></i> " . $this->lang->doc->createAB . " <span class='caret'></span></button>";
|
||||
$html .= "<ul class='dropdown-menu pull-right'>";
|
||||
|
||||
if(common::hasPriv('doc', 'create'))
|
||||
{
|
||||
foreach($this->lang->doc->typeList as $typeKey => $typeName)
|
||||
{
|
||||
$class = strpos($this->config->doc->officeTypes, $typeKey) !== false ? 'iframe' : '';
|
||||
@@ -1923,10 +1926,11 @@ class docModel extends model
|
||||
$html .= "</li>";
|
||||
if($typeKey == 'url') $html .= '<li class="divider"></li>';
|
||||
}
|
||||
}
|
||||
|
||||
if(common::hasPriv('doc', 'createLib'))
|
||||
{
|
||||
$html .= '<li class="divider"></li>';
|
||||
if(common::hasPriv('doc', 'create')) $html .= '<li class="divider"></li>';
|
||||
$html .= '<li>' . html::a(helper::createLink('doc', 'createLib', "type=$objectType&objectID=$objectID"), "<i class='icon-doc-lib icon'></i> " . $this->lang->doc->createLib, '', "class='iframe' data-width='70%'") . '</li>';
|
||||
}
|
||||
$html .= "</ul></div>";
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -25,10 +25,12 @@
|
||||
<th><?php echo $lang->group->desc;?></th>
|
||||
<td><?php echo html::textarea('desc', '', "rows=5 class=form-control");?></td>
|
||||
</tr>
|
||||
<?php if($this->app->tab != 'project'):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->group->limited;?></th>
|
||||
<td><?php echo html::checkbox('limited', '');?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<td colspan='2' class='text-center'><?php echo html::submitButton();?></td>
|
||||
</tr>
|
||||
|
||||
@@ -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['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');
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
<?php endif; endif; $childId++;?>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<?php if($result->caseResult == 'fail'):?>
|
||||
<?php if($result->caseResult == 'fail' and common::hasPriv('testcase', 'createBug')):?>
|
||||
<tr>
|
||||
<td></td><td></td><td></td><td></td><td></td><td></td>
|
||||
<td><?php echo html::commonButton($lang->testcase->createBug, "onclick='createBug(this)'", "btn btn-primary createBtn");?></td>
|
||||
|
||||
Reference in New Issue
Block a user