From fdd04663eef804d3aa5dd915cf15d5275487c736 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 29 Nov 2010 13:34:52 +0000 Subject: [PATCH] Added ACL checks to the Info page git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20407 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../plugins/generic/infoPage/class_infoPage.inc | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/gosa-core/plugins/generic/infoPage/class_infoPage.inc b/gosa-core/plugins/generic/infoPage/class_infoPage.inc index f88502bce..9a63bda75 100644 --- a/gosa-core/plugins/generic/infoPage/class_infoPage.inc +++ b/gosa-core/plugins/generic/infoPage/class_infoPage.inc @@ -26,10 +26,10 @@ class infoPage extends plugin $str = ""; foreach($this->config->data['TABS']['MYACCOUNTTABS'] as $pluginData){ $plugin = $pluginData['CLASS']; - $plInfo = call_user_func(array($plugin,'plInfo')); - list($index, $title, $desc, $icon) = $plist->getPlugData($plugin); + if(!$this->checkAccess($plugin)) continue; + list($index, $title, $desc, $icon) = $plist->getPlugData($plugin); $str.= "\n
"; $str.= "\n ".image($icon); $str.= "\n
"; @@ -41,6 +41,18 @@ class infoPage extends plugin } return($str); } + + function checkAccess($class) + { + foreach($this->ui->ocMapping as $cat => $aclClasses){ + if(in_array($class, $aclClasses)){ + if(preg_match('/[rw]/',$this->ui->get_permissions($this->ui->dn, "{$cat}/{$class}", ''))){ + return(TRUE); + } + } + } + return(FALSE); + } function detectManagers() -- 2.30.2