Code

ACL updates
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 3 Aug 2006 04:12:09 +0000 (04:12 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 3 Aug 2006 04:12:09 +0000 (04:12 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4369 594d385d-05f5-0310-b6e9-bd551577e9d8

37 files changed:
include/class_MultiSelectWindow.inc
include/class_config.inc
include/class_userinfo.inc
include/functions.inc
plugins/admin/acl/class_aclManagement.inc
plugins/admin/acl/class_divListACL.inc
plugins/admin/applications/class_applicationManagement.inc
plugins/admin/applications/class_divListApplication.inc
plugins/admin/departments/class_departmentManagement.inc
plugins/admin/departments/class_divListDepartment.inc
plugins/admin/fai/class_askClassName.inc
plugins/admin/fai/class_divListFai.inc
plugins/admin/groups/class_divListGroup.inc
plugins/admin/groups/class_groupApplication.inc
plugins/admin/groups/class_groupMail.inc
plugins/admin/groups/class_groupManagement.inc
plugins/admin/mimetypes/class_divListMimeTypes.inc
plugins/admin/mimetypes/class_mimetypeManagement.inc
plugins/admin/ogroups/class_divListOGroup.inc
plugins/admin/ogroups/class_ogroupManagement.inc
plugins/admin/systems/class_baseSelectDialog.inc
plugins/admin/systems/class_divListSystem.inc
plugins/admin/systems/class_divListSystemService.inc
plugins/admin/systems/class_glpiSelectUser.inc
plugins/admin/systems/class_systemManagement.inc
plugins/admin/users/class_divListUsers.inc
plugins/admin/users/class_userManagement.inc
plugins/gofax/blocklists/class_blocklistManagement.inc
plugins/gofax/blocklists/class_divListBlocklists.inc
plugins/gofax/faxaccount/class_gofaxAccount.inc
plugins/gofon/conference/class_divListConferences.inc
plugins/gofon/conference/class_phoneConferenceManagment.inc
plugins/gofon/macro/class_divListMacros.inc
plugins/gofon/macro/class_gofonMacroManagement.inc
plugins/personal/mail/class_mailAccount.inc
plugins/personal/posix/class_posixAccount.inc
plugins/personal/samba/class_sambaAccount.inc

index 9dd83864c87abca7542ae2ccb0f2686a501b7a49..29d455edb230dffcae58f71cb74b055cb517405b 100644 (file)
@@ -34,6 +34,7 @@ class MultiSelectWindow{
   var $HideFilterPart     = false;
 
   var $SaveAdditionalVars = array();  // Additional Post vars to store 
+  var $module= "";
 
        function ClearElementsList()
        {
@@ -72,9 +73,10 @@ class MultiSelectWindow{
        }
 
        /* Contrucktion */
-       function MultiSelectWindow($config,$filterName)
+       function MultiSelectWindow($config, $filterName, $module)
        {
                $this->config = $config;
+               $this->module = $module;
                $this->SaveButtonString         = _("Save");
                $this->CloseButtonString        = _("Close");
                $this->filterName                       = $filterName;
@@ -552,8 +554,8 @@ class MultiSelectWindow{
                $this->departments = array();
 
                /* Get all departments within this subtree */
-               $deps= get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->ui->subtreeACL,
-                               $base, array("ou", "description"), GL_SIZELIMIT | GL_CONVERT);
+               $deps= get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->module, $base,
+                    array("ou", "description"), GL_SIZELIMIT | GL_CONVERT);
 
                /* Edit delete link for system types
                 */
index 473319751d283abd023c7546e5177cd5228864a6..13c87c11db9f1f6fde76db4e29c476deaffc85d2 100644 (file)
@@ -670,7 +670,8 @@ class config  {
     $return = array();
     $ui = get_userinfo();
     $base = $config->current['BASE'];
-    $res = get_list("(&(objectClass=goShareServer)(goExportEntry=*))",$ui->subtreeACL,$base,array("goExportEntry","cn"),GL_SUBSEARCH);
+echo "Need to adapt share list loading<br>";
+    $res= get_list("(&(objectClass=goShareServer)(goExportEntry=*))", "all", $base,array("goExportEntry","cn"),GL_SUBSEARCH);
     foreach($res as $entry){
       if(isset($entry['goExportEntry']['count'])){
         unset($entry['goExportEntry']['count']);
index b8a2fa737c523943bdbbe252fabeee13f1d4bd00..f082e1f6c6daf883b89a3488484ba818ab8f1d75 100644 (file)
@@ -207,8 +207,15 @@ class userinfo
             continue;
           }
 
-        }
+          /* If attribute is "", we want to know, if we've *any* permissions here... */
+          if ($attribute == "" && isset($subacl['acl'][$object])){
+            foreach($subacl['acl'][$object] as $attr => $dummy){
+              $acl= $this->mergeACL($acl, $subacl['type'], $subacl['acl'][$object][$attr]);
+            }
+            continue;
+          }
 
+        }
       }
     }
 
@@ -238,6 +245,9 @@ class userinfo
 
     /* Extract all relevant objects for this module from plist */
     foreach ($plist->info as $object => $info){
+      if (!isset($info['plCategory'])){
+        continue;
+      }
       foreach ($info['plCategory'] as $idx => $data){
         if (preg_match('/^[0-9]+$/', $idx)){
           if ($data == $module){
index 4c909b7d122ef8a1551140a005df1c9537df453f..5f1d386f75cfc8497e0e47f3486b28ee0c93017c 100644 (file)
@@ -582,12 +582,10 @@ function get_lock ($object)
 }
 
 
-function get_list($filter, $subtreeACL, $base= "", $attributes= array(), $flags= GL_SUBSEARCH)
+function get_list($filter, $object, $base= "", $attributes= array(), $flags= GL_SUBSEARCH)
 {
   global $config, $ui;
 
-  echo "get_list called. Replace it, it doesn't support new acls";
-
   /* Get LDAP link */
   $ldap= $config->get_ldap_link($flags & GL_SIZELIMIT);
 
@@ -598,12 +596,6 @@ function get_list($filter, $subtreeACL, $base= "", $attributes= array(), $flags=
     $ldap->cd ($base);
   }
 
-  /* Strict filter for administrative units? */
-  if ($ui->gosaUnitTag != "" && isset($config->current['STRICT_UNITS']) &&
-      preg_match('/TRUE/i', $config->current['STRICT_UNITS'])){
-    $filter= "(&(gosaUnitTag=".$ui->gosaUnitTag.")$filter)";
-  }
-
   /* Perform ONE or SUB scope searches? */
   if ($flags & GL_SUBSEARCH) {
     $ldap->search ($filter, $attributes);
@@ -619,12 +611,26 @@ function get_list($filter, $subtreeACL, $base= "", $attributes= array(), $flags=
   /* Crawl through reslut entries and perform the migration to the
      result array */
   $result= array();
+
   while($attrs = $ldap->fetch()) {
     $dn= $ldap->getDN();
 
-    foreach ($subtreeACL as $key => $value){
-      if (preg_match("/$key/", $dn)){
+    /* Sort in every value that fits the permissions */
+    if (is_array($object)){
+      foreach ($object as $o){
+        if ($ui->get_permissions($dn, $o, "") != ""){
+          if ($flags & GL_CONVERT){
+            $attrs["dn"]= convert_department_dn($dn);
+          } else {
+            $attrs["dn"]= $dn;
+          }
 
+          /* We found what we were looking for, break speeds things up */
+          $result[]= $attrs;
+        }
+      }
+    } else {
+      if ($ui->get_permissions($dn, $object, "") != ""){
         if ($flags & GL_CONVERT){
           $attrs["dn"]= convert_department_dn($dn);
         } else {
@@ -633,7 +639,6 @@ function get_list($filter, $subtreeACL, $base= "", $attributes= array(), $flags=
 
         /* We found what we were looking for, break speeds things up */
         $result[]= $attrs;
-        break;
       }
     }
   }
index a7c7215ddeba1e775373beb4f571f603e6b97f18..4bbab22ea4d0043283bce4eed47e03e6a3606948 100644 (file)
@@ -329,7 +329,7 @@ class aclManagement extends plugin
     }
 
     /* Get objects */
-    $res= get_list($Filter, $this->ui->subtreeACL,$base, $Attrs, $Flags);
+    $res= get_list($Filter, "acl", $base, $Attrs, $Flags);
 
     $this->list = $res;
   }
index 446fd3e0be73caf4c3e80d465e7bc435a3f198b6..6e839bcc4ce0476cc10546863d9d06170200f22a 100644 (file)
@@ -22,7 +22,7 @@ class divListACL extends MultiSelectWindow
 
   function divListACL ($config,$parent)
   {
-    MultiSelectWindow::MultiSelectWindow($config,"ACLs");
+    MultiSelectWindow::MultiSelectWindow($config, "ACLs", "acls");
     
     $this->parent       = $parent;
     $this->ui           = get_userinfo();
index 7f6ee679e333b7b4fb72da9599bfbd1d25b543f0..6c35f6526beb58fad0be39db7aa85228debb0293 100644 (file)
@@ -418,7 +418,7 @@ class applicationManagement extends plugin
       $Flags    |= GL_SUBSEARCH;  
     }
    
-    $res= get_list($Filter, $this->ui->subtreeACL,$use_base, array("cn","description","dn","objectClass"), $Flags);
+    $res= get_list($Filter, "application", $use_base, array("cn","description","dn","objectClass"), $Flags);
     foreach ($res as $val){
       $tmp[strtolower($val['cn'][0]).$val['cn'][0]]=$val;
     }
index 8487f9b4dc55b6b27d1b36583a817f5e2e8efd2b..f1bf263426744c86450485b094de9af70c23c7af 100755 (executable)
@@ -20,7 +20,7 @@ class divListApplication extends MultiSelectWindow
 
   function divListApplication ($config,$parent)
   {
-    MultiSelectWindow::MultiSelectWindow($config,"Application");
+    MultiSelectWindow::MultiSelectWindow($config,"Application", "application");
    
     $this->selectedRelease = "ou=apps,".$_SESSION['CurrentMainBase'];
  
index 018e2e38aa35fb21e9a0eedddaaac9af899b581f..42fefdfcb73de8dbd9d170f508de0c94193a6588 100644 (file)
@@ -342,10 +342,10 @@ class departmentManagement extends plugin
 
     if($this->DivListDepartment->SubSearch){
       $res= get_list("(&(|(ou=$Regex)(description=$Regex))(objectClass=gosaDepartment))",
-          $this->ui->subtreeACL, $base, array("ou", "description"), GL_SIZELIMIT | GL_SUBSEARCH);
+          "department", $base, array("ou", "description"), GL_SIZELIMIT | GL_SUBSEARCH);
     }else{
       $res= get_list("(&(|(ou=$Regex)(description=$Regex))(objectClass=gosaDepartment))",
-          $this->ui->subtreeACL, $base, array("ou", "description"), GL_SIZELIMIT );
+          "department", $base, array("ou", "description"), GL_SIZELIMIT );
     }
 
     $this->departments= array();
index ebbb7ac3f77a887250ce3879bcd7bdfb515362f1..f83a561d11b6afb95852c4a9eb0cde788aa01d15 100755 (executable)
@@ -18,7 +18,7 @@ class divListDepartment extends MultiSelectWindow
 
   function divListDepartment ($config,$parent)
   {
-    MultiSelectWindow::MultiSelectWindow($config,"Department");
+    MultiSelectWindow::MultiSelectWindow($config, "Department", "department");
     
     $this->parent       = $parent;
     $this->ui           = get_userinfo();
index c45d9996d9942dbc4e6437164ab87df35e361605..b9f854f75a252d29009b5b85cb4080344621a959 100644 (file)
@@ -51,13 +51,13 @@ class askClassName extends plugin
     }
     $ldap = $this->config->get_ldap_link();
     
-    $res= get_list("(&(objectClass=organizationalUnit)(!(objectClass=FAIbranch)))", $this->ui->subtreeACL, $base,
+    $res= get_list("(&(objectClass=organizationalUnit)(!(objectClass=FAIbranch)))", "fai", $base,
                    array("cn","description","objectClass"), GL_SIZELIMIT );
 
     $delete = array();
     $used   = array();
     foreach($res as $objecttypes){
-      $res2= get_list("(objectClass=*)", $this->ui->subtreeACL, $objecttypes['dn'],
+      $res2= get_list("(objectClass=*)", "fai", $objecttypes['dn'],
                       array("cn","description","objectClass","FAIclass","FAIstate"), GL_SIZELIMIT | GL_CONVERT );
       foreach($res2 as $object){
 
index f8826637a45181740dcbed2db23f074046cd6945..56a0d2bb4d9b447c91b59d39a9a53f6e3d54d649 100644 (file)
@@ -28,7 +28,7 @@ class divListFai extends MultiSelectWindow
 
   function divListFai ($config,$parent)
   {
-    MultiSelectWindow::MultiSelectWindow($config,"Fai");
+    MultiSelectWindow::MultiSelectWindow($config, "Fai", "fai");
     
     $this->parent       = $parent;
     $this->ui           = get_userinfo();
index 1605e4cf1a2a88ccb240b17ad0fa756a13b2ddda..ffac981347ae019156525bc19fb3eef09d900fa3 100644 (file)
@@ -26,7 +26,7 @@ class divListGroup extends MultiSelectWindow
 
   function divListGroup ($config,$parent)
   {
-    MultiSelectWindow::MultiSelectWindow($config,"Groups");
+    MultiSelectWindow::MultiSelectWindow($config, "Groups", "groups");
     
     $this->parent       = $parent;
     $this->ui           = get_userinfo();
index 7228642498e8f6bdf906022a05d5d3e5662fb8af..f16e89cc1e31a17b13a19b2a8ad725c15a638b5d 100644 (file)
@@ -613,7 +613,7 @@ class appgroup extends plugin
     /* get departments */  
     $ui = get_userinfo();
     $departments = array();
-    $res = get_list("(objectClass=gosaDepartment)",$ui->subtreeACL,$this->curbase,array("description","cn","ou"),GL_SIZELIMIT);
+    $res = get_list("(objectClass=gosaDepartment)", "department", $this->curbase,array("description","cn","ou"),GL_SIZELIMIT);
     foreach($res as $value){
       $fdn= @LDAP::fix($value['dn']);
       if($value["description"][0]!=".."){
index 18bff510000933ee02b831c237dc45fdb9fd8702..9d6797aaa59f20515537ea1831226a92b6382e92 100644 (file)
@@ -470,8 +470,7 @@ class mailgroup extends plugin
         $filter.= "(!(|$exclude))";
       }
 
-      $acl= array($this->config->current['BASE'] => ":all");
-      $res= get_list("(&(objectClass=gosaMailAccount)$filter)", $acl, $gmailfilter['depselect'],
+      $res= get_list("(&(objectClass=gosaMailAccount)$filter)", "users", $gmailfilter['depselect'],
                      array("sn", "mail", "givenName"), GL_SUBSEARCH | GL_SIZELIMIT);
       $ldap->cd($gmailfilter['depselect']);
       $ldap->search ("(&(objectClass=gosaMailAccount)$filter)", array("sn", "mail", "givenName"));
index 637abae5b9309b5a85f151b73377625fdc7b912a..4f6c74ad222822e01c7820524aa91fd97e63713e 100644 (file)
@@ -432,8 +432,8 @@ class groupManagement extends plugin
     /* Collect primary groupIDs to show primary groups 
        if this option is enabled in gosa conf && the checkbox is checked */  
     if ($this->ShowPrimaryCheckBox){
-      $res = get_list("(&(uid=$Regex)(!(uid=*$))(objectClass=posixAccount)(gidNumber=*))", $this->ui->subtreeACL,
-          $base,array("gidNumber", "cn"),  GL_SUBSEARCH);
+      $res = get_list("(&(uid=$Regex)(!(uid=*$))(objectClass=posixAccount)(gidNumber=*))",
+          "groups", $base,array("gidNumber", "cn"),  GL_SUBSEARCH);
       foreach ($res as $attrs){
         $primaries[$attrs['gidNumber'][0]]= $attrs['cn'][0];
       }
@@ -442,7 +442,7 @@ class groupManagement extends plugin
     /* Collect all GroupIDs from those groups which are functional.
        Only perfrom this search if  ShowFunctionalGroups  is unchecked, else leave arre empty  */ 
     $ff = "(&(cn=$Regex)(objectClass=posixGroup)(!(|(objectClass=gosaMailAccount)(objectClass=gosaApplicationGroup)$sfilter)))";
-    $res = get_list($ff,$this->ui->subtreeACL,$base,array("gidNumber", "cn", "description"), GL_SUBSEARCH);
+    $res = get_list($ff, "groups", $base,array("gidNumber", "cn", "description"), GL_SUBSEARCH);
     foreach($res as $attrs){
       if (!isset($primaries[$attrs['gidNumber'][0]])){
         $functional[$attrs['gidNumber'][0]]= $attrs['gidNumber'][0];
@@ -458,9 +458,9 @@ class groupManagement extends plugin
     $attrs = array("cn", "description", "gidNumber", "objectClass","FAIrelease");
 
     if ($SubSearch){
-      $res= get_list($filter, $this->ui->subtreeACL, $base, $attrs, GL_SIZELIMIT| GL_SUBSEARCH);
+      $res= get_list($filter, "groups", $base, $attrs, GL_SIZELIMIT| GL_SUBSEARCH);
     } else {
-      $res= get_list($filter, $this->ui->subtreeACL, get_groups_ou().$base, $attrs, GL_SIZELIMIT);
+      $res= get_list($filter, "groups", get_groups_ou().$base, $attrs, GL_SIZELIMIT);
     }
 
     /* Sort values into grouplist*/
index eea9f505ea228c69e148a84fea17a2a8065bafc2..2fd85ecb3cd627485b77ad8b819b843319bbb680 100755 (executable)
@@ -23,7 +23,7 @@ class divListMimeTypes extends MultiSelectWindow
   function divListMimeTypes ($config,$parent)
   {
     /* Create divlist and setup */
-    MultiSelectWindow::MultiSelectWindow($config,"Mimetypes");
+    MultiSelectWindow::MultiSelectWindow($config, "Mimetypes", "mimetypes");
   
     /* initialize required attributes */ 
     $this->selectedRelease  = "ou=mime,".$_SESSION['CurrentMainBase'];
index 52f91ddc8e5c432894c47db5942878dd280a8f0a..a4da4d430fb733be84339de8230e682380f997b0 100755 (executable)
@@ -415,7 +415,7 @@ class mimetypeManagement extends plugin
     }
   
     /* Get results and create index */ 
-    $res= get_list($Filter, $this->ui->subtreeACL,$use_base, array("cn","description","dn","objectClass"), $Flags);
+    $res= get_list($Filter, "mimetypes", $use_base, array("cn","description","dn","objectClass"), $Flags);
     foreach ($res as $val){
       $tmp[strtolower($val['cn'][0]).$val['cn'][0]]=$val;
     }
index 861ffe2e905fc49df8ef25f08b6e09a34b23ce52..415a6b9641b4f760fc3b96fc24a629a7ad4293e1 100755 (executable)
@@ -29,7 +29,7 @@ class divListOGroup extends MultiSelectWindow
 
   function divListOGroup ($config,$parent)
   {
-    MultiSelectWindow::MultiSelectWindow($config,"OGroups");
+    MultiSelectWindow::MultiSelectWindow($config, "OGroups", "ogroups");
     
     $this->parent       = $parent;
     $this->ui           = get_userinfo();
index b30a4f1468e51b3116c454e951a5ee23ad5a7d8a..8dafd74e517343c5d82230116d8da09ad96a407f 100644 (file)
@@ -450,9 +450,9 @@ class ogroupManagement extends plugin
     $filter= "(&(cn=$Regex)(objectClass=gosaGroupOfNames)(|$filter))";
 
     if($this->DivListOGroup->SubSearch){
-      $res= get_list($filter, $this->ui->subtreeACL, $base, array("cn","objectClass","gosaGroupObjects"), GL_SIZELIMIT | GL_SUBSEARCH);
+      $res= get_list($filter, "ogroups", $base, array("cn","objectClass","gosaGroupObjects"), GL_SIZELIMIT | GL_SUBSEARCH);
     }else{
-      $res= get_list($filter, $this->ui->subtreeACL, get_groups_ou().$base, array("cn","objectClass","gosaGroupObjects"), GL_SIZELIMIT );
+      $res= get_list($filter, "ogroups", get_groups_ou().$base, array("cn","objectClass","gosaGroupObjects"), GL_SIZELIMIT );
     }
 
     $this->ogrouplist= $res;
index 50fb1204dd116f776ccc13f9ae8d3f5c5f1d072a..fe3ccd75585737841d01f53016b7796cffac5d94 100644 (file)
@@ -12,7 +12,9 @@ class baseSelectDialog extends MultiSelectWindow
  
   function baseSelectDialog ($config,$parent,$onlyAllowThisBases = array())
   {
-    MultiSelectWindow::MultiSelectWindow($config,"BASEselectWindow");
+    echo "Need to pass module via parameter!<br>";
+    $module= "all";
+    MultiSelectWindow::MultiSelectWindow($config, "BASEselectWindow", $module);
    
     $this->parent = $parent;
  
index fe125e2aa7090e760c6afafae5d23041836084b5..bf73c5504f8c0cf58adf570a0c2678e113f01373 100644 (file)
@@ -28,7 +28,11 @@ class divListSystem extends MultiSelectWindow
 
   function divListSystem ($config,$parent)
   {
-    MultiSelectWindow::MultiSelectWindow($config,"System");
+    MultiSelectWindow::MultiSelectWindow($config, "System", array("server",
+                                                                  "workstation",
+                                                                  "terminal",
+                                                                  "phone",
+                                                                  "printer"));
 
     $this->parent       = $parent;
     $this->ui           = get_userinfo();
index 25e2ed55212717cac9c3a36f69e19be879f9a8d4..3d6fc5087b899538ef19d2df92394e1d43622bae 100644 (file)
@@ -8,7 +8,7 @@ class divListSystemService extends MultiSelectWindow
 
   function divListSystemService ($config,$parent)
   {
-    MultiSelectWindow::MultiSelectWindow($config,"SystemService");
+    MultiSelectWindow::MultiSelectWindow($config,"SystemService", "server");
     
     $this->parent       = $parent;
     $this->ui           = get_userinfo();
index 4d8e2d41adace1e64f0001e4a7f824e612066022..8e7eff7e3812b28adc51c79dd027af5509f5da03 100644 (file)
@@ -209,7 +209,7 @@ class glpiSelectUser extends plugin
      */
 
     $res3= get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))",
-                    $this->ui->subtreeACL, $base, array("ou", "description"), GL_SIZELIMIT | GL_CONVERT);
+                    "glpi", $base, array("ou", "description"), GL_SIZELIMIT | GL_CONVERT);
 
     $this->departments= array();
     $tmp = array();
@@ -228,7 +228,7 @@ class glpiSelectUser extends plugin
     /* END NEW LIST MANAGMENT
      */
     $ou = get_people_ou();
-    $res2= get_list("(&(|(cn=$regex)(sn=$regex))(objectClass=person))", $this->ui->subtreeACL,
+    $res2= get_list("(&(|(cn=$regex)(sn=$regex))(objectClass=person))", "glpi",
                     $ou.$base, array("cn", "sn", "uid", "givenName", "description"),
                     GL_SUBSEARCH | GL_SIZELIMIT);
 
index 0f86b327eb134579f491232cd6e01baffd338b78..ac7f6efbf261a77539c4fa5ebeba1046de86e31a 100644 (file)
@@ -610,14 +610,14 @@ class systems extends plugin
         if($this->DivListSystem->SubSearch){
           if($oc['CLASS'] != ""){
             $filter = "(|(&".$userregex."(objectClass=".$oc['CLASS'].")(cn=".$this->DivListSystem->Regex.")))";
-            $res = array_merge($res,get_list($filter,$this->ui->subtreeACL, $base,
+            $res = array_merge($res,get_list($filter, array("terminal", "workstation", "server", "phone" ,"printer"), $base,
                   array("cn", "description", "macAddress", "objectClass", "sambaDomainName", "FAIstate"), GL_NONE | GL_SUBSEARCH | GL_SIZELIMIT));
           }
         }else{
           /* User filter? */
           if($oc['CLASS'] != ""){
             $filter = "(|(&".$userregex."(objectClass=".$oc['CLASS'].")(cn=".$this->DivListSystem->Regex.")))";
-            $res = array_merge($res,get_list($filter,$this->ui->subtreeACL, $oc['TREE'].$base,
+            $res = array_merge($res,get_list($filter,array("terminal", "workstation", "server", "phone" ,"printer"),$oc['TREE'].$base,
                   array("cn", "description", "macAddress", "objectClass", "sambaDomainName", "FAIstate"), GL_NONE | GL_SIZELIMIT));
           }
         }
@@ -626,7 +626,7 @@ class systems extends plugin
 
     /* Search for incoming objects */ 
     $filter = "(|(&".$userregex."(objectClass=goHard)(cn=".$this->DivListSystem->Regex.")))";
-    $res = array_merge($res,get_list($filter,$this->ui->subtreeACL, "ou=incoming,".$base,
+    $res = array_merge($res,get_list($filter,array("terminal", "workstation", "server", "phone" ,"printer"),"ou=incoming,".$base,
           array("cn", "description", "macAddress", "objectClass", "sambaDomainName"), GL_NONE | GL_SIZELIMIT));
 
     /* Get all gotoTerminal's */
index 4ff03c56213818945e0b36727f0828ba271bc74e..699780812e97699621f4b9313b039f33f69d4e62 100644 (file)
@@ -26,7 +26,7 @@ class divListUsers extends MultiSelectWindow
 
   function divListUsers ($config,$parent)
   {
-    MultiSelectWindow::MultiSelectWindow($config,"Users");
+    MultiSelectWindow::MultiSelectWindow($config, "Users", "users");
     
     $this->parent       = $parent;
     $this->ui           = get_userinfo();
@@ -79,6 +79,10 @@ class divListUsers extends MultiSelectWindow
        which are shown in the listbox on top of the listbox
      */
     $options= "";
+#print_a($this->config->idepartments);
+#$ui= get_userinfo();
+#$t= $ui->get_module_departments("users");
+#print_a($t);
     foreach ($this->config->idepartments as $key => $value){
       if ($this->selectedBase == $key){
         $options.= "<option selected='selected' value='$key'>$value</option>";
index e8540af7f827888c8fc33fa6c916c2f96b7d763f..8e7f6415f5d3211649881503dfbdf87600bf5d9c 100644 (file)
@@ -717,11 +717,11 @@ class userManagement extends plugin
     $ldap= $this->config->get_ldap_link(TRUE);
 
     if ($SubSearch){
-      $ListTemp =  get_list($filter, $this->ui->subtreeACL, $base,
+      $ListTemp =  get_list($filter, "users", $base,
                             array("uid", "givenName", "sn", "objectClass"), GL_SUBSEARCH | GL_SIZELIMIT);
     } else {
       $base= get_people_ou().$base;
-      $ListTemp = get_list($filter, $this->ui->subtreeACL, $base, 
+      $ListTemp = get_list($filter, "users", $base, 
                             array("uid", "givenName", "sn", "objectClass"), GL_SIZELIMIT);
     }
     $SortTemp = array();
index 9cb8958be8b472abd1b6abf58363d435770a17c3..9b946ee97cce5792d6b571dd05d4f497d11cd463 100644 (file)
@@ -29,10 +29,6 @@ class blocklist extends plugin
     $this->dn     = "";
     $this->config = $config;
 
-    $ui           = get_userinfo();
-    $acl          = get_permissions ($ui->dn, $ui->subtreeACL);
-    $this->acl    = get_module_permission($acl, "blocklists", $ui->dn);
-
     $this->DivListBlocklist = new divListBlocklist($this->config,$this);
   }
 
@@ -383,11 +379,11 @@ class blocklist extends plugin
     /* Create filter */
     if ($ShowSendBocklists){
       $filter = "(&(objectClass=goFaxSBlock)(|(cn=".$Regex.")(goFaxSBlocklist=".$Regex.")))";
-      $res= get_list($filter, $this->ui->subtreeACL, $base,array("*"), $Flags);
+      $res= get_list($filter, "gofax", $base,array("*"), $Flags);
     }
     if ($ShowReceiveBlocklists){
       $filter2= "(&(objectClass=goFaxRBlock)(|(cn=".$Regex.")(goFaxRBlocklist=".$Regex.")))";
-      $res2= get_list($filter2, $this->ui->subtreeACL, $base,array("*"), $Flags);
+      $res2= get_list($filter2, "gofax", $base,array("*"), $Flags);
     }
    
     $this->blocklists = array_merge($res,$res2);
index fc024a1d438c4e1dbe9973f2d5253aae03f79d51..bada73d0aac87e83d13f2e6921256579906c42d2 100755 (executable)
@@ -22,7 +22,7 @@ class divListBlocklist extends MultiSelectWindow
 
   function divListBlocklist ($config,$parent)
   {
-    MultiSelectWindow::MultiSelectWindow($config,"Blocklists");
+    MultiSelectWindow::MultiSelectWindow($config, "Blocklists", "gofax");
     
     $this->parent       = $parent;
     $this->ui           = get_userinfo();
index 78102e8609f0edef26d7a1131f5c3f81e8ed2ca2..5aa2b8bc282030d22270c80986fc195a35e6a03e 100644 (file)
@@ -337,8 +337,7 @@ class gofaxAccount extends plugin
       }
 
       $base= $faxfilter['depselect'];
-      $acl= array($this->config->current['BASE'] => ":all");
-      $res= get_list("(&(objectClass=goFaxAccount)$filter)", $acl, $base, 
+      $res= get_list("(&(objectClass=goFaxAccount)$filter)", "gofax", $base, 
                      array("sn", "givenName", "facsimileTelephoneNumber"), GL_SIZELIMIT | GL_SUBSEARCH);
 
       foreach ($res as $attrs){
index 8d40cba52876999445979e6ab758d177c2576b73..37912ed17a2060cc2f734aec7ef07a9604a8dbdf 100755 (executable)
@@ -22,7 +22,7 @@ class divListConference extends MultiSelectWindow
 
   function divListConference ($config,$parent)
   {
-    MultiSelectWindow::MultiSelectWindow($config,"Conferences");
+    MultiSelectWindow::MultiSelectWindow($config,"Conferences", "gofon");
     
     $this->parent       = $parent;
     $this->ui           = get_userinfo();
index 0be3ec8e659e22671ccc716807c27aac2273c093..1bfb9b2f855db89b3ec8880d3a531812608d6bdb 100644 (file)
@@ -299,7 +299,7 @@ class phoneConferenceManagment extends plugin
       $Flags |= GL_SUBSEARCH;
     }
 
-    $this->conferences= get_list($Filter,  $this->ui->subtreeACL, $Base, $Attrs, $Flags);
+    $this->conferences= get_list($Filter, "gofon", $Base, $Attrs, $Flags);
   }
 
   function remove_from_parent()
index 284c939ad7ab5f45f037d5d87bf84dda1aa12b22..5ffdd144783d511f245e1c375b483e0343d0edcc 100755 (executable)
@@ -22,7 +22,7 @@ class divListMacro extends MultiSelectWindow
 
   function divListMacro ($config,$parent)
   {
-    MultiSelectWindow::MultiSelectWindow($config,"Macros");
+    MultiSelectWindow::MultiSelectWindow($config,"Macros", "gofon");
     
     $this->parent       = $parent;
     $this->ui           = get_userinfo();
index aab1648bd7c13a2a5346b114b968d6448df15d94..1f3bd1e3e267ffc0c4a2968a91eef3995cc0e40d 100755 (executable)
@@ -323,7 +323,7 @@ class gofonMacro extends plugin
     }
 
     /* Generate macro list */
-    $res= get_list($Filter, $this->ui->subtreeACL,$base, $Attrs, $Flags);
+    $res= get_list($Filter, "gofon", $base, $Attrs, $Flags);
 
     $tmp=array();
     foreach($res as $tkey => $val ){
index 3742daba541caa6d0a73c2cdc0dbd8de73949748..6b9ae99faaebe47cb446f13a71fab21184474d62 100644 (file)
@@ -441,7 +441,7 @@ class mailAccount extends plugin
       }
 
       $acl= array($this->config->current['BASE'] => ":all");
-      $res= get_list("(&(objectClass=gosaMailAccount)$filter)", $acl, $mailfilter['depselect'], 
+      $res= get_list("(&(objectClass=gosaMailAccount)$filter)", "users", $mailfilter['depselect'], 
                      array("sn", "mail", "givenName"), GL_SIZELIMIT | GL_SUBSEARCH);
       $ldap->cd($mailfilter['depselect']);
       $ldap->search ("(&(objectClass=gosaMailAccount)$filter)", array("sn", "mail", "givenName"));
index a67d03b95f1afda74da42c4534294c8c1963d733..d2fa156ae25cced6be9d6ea4ab611a0c4b2b7949 100644 (file)
@@ -226,8 +226,6 @@ class posixAccount extends plugin
   /* execute generates the html output for this node */
   function execute($isCopyPaste = false)
   {
-    echo "Fix get_list for group add";
-
     /* Call parent execute */
     plugin::execute();
     $display= "";
@@ -377,10 +375,9 @@ class posixAccount extends plugin
       if ($exclude != ""){
         $exclude= "(!(|$exclude))";
       }
-      $acl= array($this->config->current['BASE'] => ":all");
       $regex= $sysfilter['regex'];
       $filter= "(&(|(objectClass=goServer)(objectClass=gotoWorkstation)(objectClass=gotoTerminal))$exclude(cn=*)(cn=$regex))";
-      $res= get_list($filter, $acl, $sysfilter['depselect'], array("cn"), GL_SUBSEARCH | GL_SIZELIMIT);
+      $res= get_list($filter, "groups", $sysfilter['depselect'], array("cn"), GL_SUBSEARCH | GL_SIZELIMIT);
       $wslist= array();
       foreach ($res as $attrs){
         $wslist[]= preg_replace('/\$/', '', $attrs['cn'][0]);
@@ -530,6 +527,7 @@ class posixAccount extends plugin
       }
     } else {
       if ($_SESSION['js']){
+#FIXME: whats up here. remove acl?
         if($this->acl != "#none#")
           $smarty->assign("forceMode", "disabled");
       }
@@ -1134,8 +1132,7 @@ class posixAccount extends plugin
       $base = get_groups_ou().$base;
     }
 
-
-    $res= get_list($filter, $this->ui->subtreeACL, $base,$attrs, $Flags);
+    $res= get_list($filter, "groups", $base,$attrs, $Flags);
 
     /* check sizelimit */
     if (preg_match("/size limit/i", $ldap->error)){
index 219866734127f74a944495f7d4b4099b5aab96ba..2d851a2cc41b79101e87db2802da29f27a8c9cc1 100644 (file)
@@ -324,10 +324,9 @@ class sambaAccount extends plugin
       if ($exclude != ""){
         $exclude= "(!(|$exclude))";
       }
-      $acl= array($this->config->current['BASE'] => ":all");
       $regex= $sambafilter['regex'];
       $filter= "(&(objectClass=sambaSAMAccount)$exclude(uid=*$)(|(uid=$regex)(cn=$regex)))";
-      $res= get_list($filter, $acl, $sambafilter['depselect'], array("uid"), GL_SUBSEARCH | GL_SIZELIMIT);
+      $res= get_list($filter, "workstation", $sambafilter['depselect'], array("uid"), GL_SUBSEARCH | GL_SIZELIMIT);
       $wslist= array();
       foreach ($res as $attrs){
         $wslist[]= preg_replace('/\$/', '', $attrs['uid'][0]);