From ee63dc4f175ac108cc24f2dc3b3505d7e0bf7fdb Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 22 Aug 2022 09:24:18 +0800 Subject: [PATCH] * Finish task #64967. --- module/common/model.php | 6 +++++- module/user/control.php | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/module/common/model.php b/module/common/model.php index 7c784829f1..f31e9d5f8e 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -2402,7 +2402,11 @@ EOD; if(in_array($module, $this->config->programPriv->waterfall) and $this->app->tab == 'project' and $method != 'browse') return true; $this->app->user = $this->session->user; - if(!commonModel::hasPriv($module, $method)) $this->deny($module, $method); + if(!commonModel::hasPriv($module, $method)) + { + if($module == 'story' and !empty($this->app->params['storyType']) and strpos(",story,requirement,", ",{$this->app->params['storyType']},") !== false) $module = $this->app->params['storyType']; + $this->deny($module, $method); + } } else { diff --git a/module/user/control.php b/module/user/control.php index e7f9f11abb..75a0f5f18b 100755 --- a/module/user/control.php +++ b/module/user/control.php @@ -1004,7 +1004,9 @@ class user extends control $this->view->method = $method; $this->view->denyPage = $this->referer; // The denied page. $this->view->refererBeforeDeny = $refererBeforeDeny; // The referer of the denied page. - $this->app->loadLang($module); + if($module == 'requirement') $this->app->loadLang('story'); + if($module != 'requirement') $this->app->loadLang($module); + $this->app->loadLang('my'); /* Check deny type. */