Code

Added ACL tag to the result of getShareServerList
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 1 Jul 2008 12:44:02 +0000 (12:44 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 1 Jul 2008 12:44:02 +0000 (12:44 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11497 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_config.inc

index 42e0c3dbee493b5b3dda9a6a7e6bf4503b942211..225f647cf34a0fe83e65e542f565c9ec76eacf25 100644 (file)
@@ -826,18 +826,27 @@ class config  {
   {
     global $config;
     $return = array();
+    $ui = get_userinfo();
     $base = $config->current['BASE'];
     $res= get_sub_list("(&(objectClass=goShareServer)(goExportEntry=*))", "server",
-          get_ou("serverou"), $base,array("goExportEntry","cn"),GL_NONE);
+          get_ou("serverou"), $base,array("goExportEntry","cn"),GL_NONE | GL_NO_ACL_CHECK);
 
     foreach($res as $entry){
+        
+        $acl = $ui->get_permissions($entry['dn'],"server/goShareServer","");
         if(isset($entry['goExportEntry']['count'])){
           unset($entry['goExportEntry']['count']);
         }
         foreach($entry['goExportEntry'] as $share){
           $a_share = split("\|",$share);
           $sharename = $a_share[0];
-          $return[$entry['cn'][0]."|".$sharename] = $entry['cn'][0]." [".$sharename."]";
+          $data= array();
+          $data['NAME']   = $sharename;
+          $data['ACL']    = $acl;
+          $data['SERVER'] = $entry['cn']['0'];
+          $data['SHARE']  = $sharename;
+          $data['DISPLAY']= $entry['cn'][0]." [".$sharename."]";
+          $return[$entry['cn'][0]."|".$sharename] = $data;
         }
     }
     return($return);