From 41e2e45e8a783d4b388bf8f6a22b8e0e754d6509 Mon Sep 17 00:00:00 2001 From: zenggang Date: Wed, 9 Mar 2022 09:27:42 +0000 Subject: [PATCH] * Fix bug#20464 --- module/custom/model.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/module/custom/model.php b/module/custom/model.php index 2576344129..10c3543c0f 100644 --- a/module/custom/model.php +++ b/module/custom/model.php @@ -244,6 +244,18 @@ class customModel extends model $link = explode('|', $link); list($label, $module, $method) = $link; $hasPriv = commonModel::hasPriv($module, $method); + /* Fix bug#20464 */ + if(!$hasPriv and is_array($item) and isset($item['subMenu'])) + { + foreach($item['subMenu'] as $subMenu) + { + if(!isset($subMenu['link'])) continue; + list($subLabel, $module, $method) = explode('|', $subMenu['link']); + $hasPriv = commonModel::hasPriv($module, $method); + if($hasPriv == true) break; + } + } + if($module == 'execution' and $method == 'more') $hasPriv = true; if($module == 'project' and $method == 'other') $hasPriv = true; }