From: hickert Date: Mon, 29 Nov 2010 13:34:52 +0000 (+0000) Subject: Added ACL checks to the Info page X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=fdd04663eef804d3aa5dd915cf15d5275487c736;p=gosa.git Added ACL checks to the Info page git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20407 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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()