* Modify the code.

This commit is contained in:
tianshujie
2022-01-18 13:06:50 +08:00
parent f257fe3e5a
commit 545d7f2e24
+5 -5
View File
@@ -64,20 +64,20 @@ class executionModel extends model
public function setMenu($executionID, $buildID = 0, $extra = '')
{
$execution = $this->getByID($executionID);
if(!$this->app->user->admin and strpos(",{$this->app->user->view->sprints},", ",$executionID,") === false and !defined('TUTORIAL') and $executionID != 0)
if($execution and $execution->type == 'kanban')
{
if($execution->type == 'kanban') $this->lang->execution->accessDenied = str_replace($this->lang->executionCommon, $this->lang->execution->kanban, $this->lang->execution->accessDenied);
die(js::error($this->lang->execution->accessDenied) . js::locate('back'));
$this->lang->execution->menu = new stdclass();
$this->lang->execution->accessDenied = str_replace($this->lang->executionCommon, $this->lang->execution->kanban, $this->lang->execution->accessDenied);
}
if(!$this->app->user->admin and strpos(",{$this->app->user->view->sprints},", ",$executionID,") === false and !defined('TUTORIAL') and $executionID != 0) die(js::error($this->lang->execution->accessDenied) . js::locate('back'));
$executions = $this->getPairs(0, 'all', 'nocode');
if(!$executionID and $this->session->execution) $executionID = $this->session->execution;
if(!$executionID or !in_array($executionID, array_keys($executions))) $executionID = key($executions);
$this->session->set('execution', $executionID);
/* Unset story, bug, build and testtask if type is ops. */
if($execution and $execution->type == 'kanban') $this->lang->execution->menu = new stdclass();
if($execution and $execution->type == 'stage' and $this->config->systemMode == 'new')
{
global $lang;