From f257fe3e5a74c410223eaf8eda333ec6aa1e6894 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 18 Jan 2022 11:26:31 +0800 Subject: [PATCH] * Fix bug #18633. --- module/execution/model.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index a23d43d470..5cf74c0f71 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -63,7 +63,12 @@ class executionModel extends model */ public function setMenu($executionID, $buildID = 0, $extra = '') { - 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')); + $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->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')); + } $executions = $this->getPairs(0, 'all', 'nocode'); if(!$executionID and $this->session->execution) $executionID = $this->session->execution; @@ -71,7 +76,6 @@ class executionModel extends model $this->session->set('execution', $executionID); /* Unset story, bug, build and testtask if type is ops. */ - $execution = $this->getByID($executionID); if($execution and $execution->type == 'kanban') $this->lang->execution->menu = new stdclass(); if($execution and $execution->type == 'stage' and $this->config->systemMode == 'new')