diff --git a/module/execution/model.php b/module/execution/model.php index 3341621a83..b9108f8aa1 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -63,7 +63,7 @@ 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')) die(js::error($this->lang->execution->accessDenied) . js::locate('back')); + 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->loadModel('execution')->getPairs(0, 'all', 'nocode'); if(!$executionID and $this->session->execution) $executionID = $this->session->execution; diff --git a/module/product/model.php b/module/product/model.php index 4c13391b76..ed1443a4ae 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -1984,7 +1984,7 @@ class productModel extends model */ public function setMenu($productID, $branch = 0, $module = 0, $moduleType = '', $extra = '') { - if(!$this->app->user->admin and strpos(",{$this->app->user->view->products},", ",$productID,") === false) die(js::error($this->lang->product->accessDenied) . js::locate('back')); + if(!$this->app->user->admin and strpos(",{$this->app->user->view->products},", ",$productID,") === false and $productID != 0) die(js::error($this->lang->product->accessDenied) . js::locate('back')); $product = $this->getByID($productID); $params = array('branch' => $branch); diff --git a/module/qa/model.php b/module/qa/model.php index 09c1099ae5..4d917fbf75 100644 --- a/module/qa/model.php +++ b/module/qa/model.php @@ -23,7 +23,7 @@ class qaModel extends model */ public function setMenu($products, $productID, $branch = 0, $extra = '') { - if(!$this->app->user->admin and strpos(",{$this->app->user->view->products},", ",$productID,") === false) + if(!$this->app->user->admin and strpos(",{$this->app->user->view->products},", ",$productID,") === false and $productID != 0) { $this->app->loadLang('product'); die(js::error($this->lang->product->accessDenied) . js::locate('back'));