* Modify the code.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user