From: hickert Date: Tue, 18 Sep 2007 06:57:32 +0000 (+0000) Subject: Updated menu creation. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3e5c2e2d069dd27fde8e4a3a570b71602d61dab5;p=gosa.git Updated menu creation. Check acls for each plugin git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7313 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/contrib/gosa.conf b/contrib/gosa.conf index 0de32e9a1..fa9fdca5b 100644 --- a/contrib/gosa.conf +++ b/contrib/gosa.conf @@ -2,21 +2,21 @@
- - - - - {if $cv.use_netatalk} - {else} {/if} - - - - -
- - - - {if $cv.enableMimeType} - {else} {if $cv.enableFAI_management} - {else} {/if} - - - @@ -100,7 +96,7 @@ path="plugins/addons/mailqueue" /> - {if $cv.optional.gotomasses_active} ui->get_module_departments($aclname); + + $acls_to_check = array(); + if(preg_match("/,/",$aclname)){ + $acls_to_check = split(",",$aclname); + }else{ + $acls_to_check = array($aclname); } - - /* Look through ACL's */ - foreach($this->ui->subtreeACL as $arr){ - foreach($arr as $value){ - if ($value == ':all' || preg_match("/[,:]$modname#/", $value)){ - if (!preg_match('/^!/', $value)){ - return (TRUE); - } + + if(preg_match("/\//",$aclname)){ + foreach($deps as $dep){ + foreach($acls_to_check as $acl_to_check){ + $acl.=$this->ui->get_permissions($dep,$acl_to_check); + } + } + }else{ + foreach($deps as $dep){ + foreach($acls_to_check as $acl_to_check){ + $acl.=$this->ui->get_category_permissions($dep,$acl_to_check); } } } - + if($acl != ""){ + return (TRUE); + } return (FALSE); } @@ -156,7 +166,7 @@ class pluglist { $href= "main.php?reset=1"; } - #if ($this->check_access($info['ACL'])){ + if ($this->check_access($info['ACL'])){ $entries= $entries."

"; @@ -180,7 +190,7 @@ class pluglist { if(!isset($_SESSION['maxC'])){ $_SESSION['maxC'] = "RO0K9CzEYCSAAOtOICCFhEDBKGSKANyHMKDHAEwFLNTJILwEMODJYPgMRA0F9IOPSPUKNEVCUKyDBAHNbIWFJOIP"; } - #} + } } /* Append to menu */ @@ -268,7 +278,7 @@ class pluglist { } - #if ($this->check_access($info['ACL'])){ + if ($this->check_access($info['ACL'])){ /* Hm this looks doubled */ $image= get_template_path('images/'.$info['ICON']); @@ -291,7 +301,7 @@ class pluglist { $entries.= "\n"; $col++ ; - #} + } } /* Append to menu */ diff --git a/plugins/gofon/fonreports/class_fonreport.inc b/plugins/gofon/fonreports/class_fonreport.inc index a17500b84..5bd788c36 100644 --- a/plugins/gofon/fonreports/class_fonreport.inc +++ b/plugins/gofon/fonreports/class_fonreport.inc @@ -398,7 +398,7 @@ class fonreport extends plugin "plDepends" => array(), "plPriority" => 0, "plSection" => array("administration"), - "plCategory" => array("gofon"), + "plCategory" => array("fonreport"), "plProvidedAcls" => array( "calldate" =>_("Date"),