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; }