From 9691ae8a735cffe61738b3d5bedce045fdddb417 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 14 Sep 2021 15:07:38 +0800 Subject: [PATCH] * Fix bug #15160,15159. --- module/product/model.php | 2 +- module/qa/model.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/product/model.php b/module/product/model.php index ed1443a4ae..9f78b9598a 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 and $productID != 0) 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 and !defined('TUTORIAL')) 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 4d917fbf75..195735848a 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 and $productID != 0) + if(!$this->app->user->admin and strpos(",{$this->app->user->view->products},", ",$productID,") === false and $productID != 0 and !defined('TUTORIAL')) { $this->app->loadLang('product'); die(js::error($this->lang->product->accessDenied) . js::locate('back'));