From 430209e92b7c48c6781f715629ce7810d2ee06da Mon Sep 17 00:00:00 2001 From: zenggang Date: Thu, 19 May 2022 03:23:35 +0000 Subject: [PATCH] * Fix bug#22554,22673 --- module/action/control.php | 3 ++- module/productplan/control.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/module/action/control.php b/module/action/control.php index 2df3d88288..ac9224fabe 100755 --- a/module/action/control.php +++ b/module/action/control.php @@ -175,7 +175,8 @@ class action extends control { $story = $this->loadModel('story')->getById($objectID); $executions = explode(',', $this->app->user->view->sprints); - if(!array_intersect(array_keys($story->executions), $executions)) return print(js::error($this->lang->error->accessDenied)); + $products = explode(',', $this->app->user->view->products); + if(!array_intersect(array_keys($story->executions), $executions) and !in_array($story->product, $products)) return print(js::error($this->lang->error->accessDenied)); } $actionID = $this->action->create($objectType, $objectID, 'Commented', $this->post->comment); diff --git a/module/productplan/control.php b/module/productplan/control.php index 85cd593b8c..8eca73eb17 100644 --- a/module/productplan/control.php +++ b/module/productplan/control.php @@ -372,7 +372,7 @@ class productplan extends control * @access public * @return void */ - public function view($planID = 0, $type = 'story', $orderBy = 'id_desc', $link = 'false', $param = '', $recTotal = 0, $recPerPage = 100, $pageID = 1) + public function view($planID = 0, $type = 'story', $orderBy = 'order_asc', $link = 'false', $param = '', $recTotal = 0, $recPerPage = 100, $pageID = 1) { $planID = (int)$planID; $plan = $this->productplan->getByID($planID, true);