From 96fc77e620514fc4f23511745bfb239b0605ab04 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Mon, 14 Mar 2022 16:36:30 +0800 Subject: [PATCH] * Fix bug#17363. --- module/execution/model.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/module/execution/model.php b/module/execution/model.php index aecdde3b76..f4393ec61a 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -252,6 +252,10 @@ class executionModel extends model if(!isset($executions[$executionID])) { $this->session->set('execution', key($executions), $this->app->tab); + + $execution = $this->dao->select('*')->from(TABLE_EXECUTION)->where('id')->eq($executionID)->andWhere('type')->in('sprint,stage,kanban')->fetch(); + if(empty($execution)) return js::error($this->lang->notFound); + if($executionID && strpos(",{$this->app->user->view->sprints},", ",{$executionID},") === false) $this->accessDenied(); }