* [bug#51626,done,0.1h] fix bug.

This commit is contained in:
sunguangming
2024-06-26 16:00:13 +08:00
committed by 王于听
parent a19e32cfde
commit bb342c48fe
2 changed files with 16 additions and 1 deletions
+4
View File
@@ -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]))
{
+12 -1
View File
@@ -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);