diff --git a/module/common/model.php b/module/common/model.php index 004dd70c50..36aad8f77a 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -1152,6 +1152,8 @@ eof; $method = $this->app->rawMethod; } + if($module == 'product' and $method == 'browse' and !empty($this->app->params['storyType']) and $this->app->params['storyType'] != 'story') $method = $this->app->params['storyType']; + $openMethods = array( 'user' => array('deny', 'logout'), 'my' => array('changepassword'), @@ -1283,6 +1285,8 @@ eof; $module = strtolower($module); $method = strtolower($method); + if($module == 'product' and $method == 'browse' and !empty($app->params['storyType']) and $app->params['storyType'] != 'story') $method = $app->params['storyType']; + global $config; if(isset($config->{$module}->groupPrivs[$method])) { diff --git a/module/custom/model.php b/module/custom/model.php index 1bc0e9ff86..2df3eb9f59 100644 --- a/module/custom/model.php +++ b/module/custom/model.php @@ -337,7 +337,18 @@ class customModel extends model { $link = explode('|', $link); list($label, $module, $method) = $link; - $hasPriv = commonModel::hasPriv($module, $method, null, zget($link, 3, '')); + + $methodName = $method; + + /* 需求列表按照对应的需求模块鉴权。 */ + if($module == 'product' && $method == 'browse') + { + $params = zget($link, 3, ''); + preg_match('/storyType=([^&]*)/', $params, $matches); + $methodName = !empty($matches[1]) ? $matches[1] : $methodName; + } + + $hasPriv = commonModel::hasPriv($module, $methodName, null, zget($link, 3, '')); /* Fix bug #20464 */ if(isset($vars)) unset($vars);