From 557a5d5d62f24992d40e9c6bcf418133337b40ae Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Wed, 18 Nov 2020 14:04:34 +0800 Subject: [PATCH] * Finish task #8387. --- module/common/model.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/module/common/model.php b/module/common/model.php index 7d726df500..2f13fcb9ad 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -1489,16 +1489,17 @@ EOD; { global $app, $lang; + $module = strtolower($module); + $method = strtolower($method); + /* Check the parent object is closed. */ - if(strpos('close|batchClose', $method) === false and !commonModel::canBeChanged($module, $object)) return false; + if(strpos('close|batchclose', $method) === false and !commonModel::canBeChanged($module, $object)) return false; /* Check is the super admin or not. */ if(!empty($app->user->admin) || strpos($app->company->admins, ",{$app->user->account},") !== false) return true; /* If not super admin, check the rights. */ $rights = $app->user->rights['rights']; $acls = $app->user->rights['acls']; - $module = strtolower($module); - $method = strtolower($method); if((($app->user->account != 'guest') or ($app->company->guest and $app->user->account == 'guest')) and $module == 'report' and $method == 'annualdata') return true;