Code

Fixed problem with moving groups
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 18 Apr 2006 11:56:00 +0000 (11:56 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 18 Apr 2006 11:56:00 +0000 (11:56 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3051 594d385d-05f5-0310-b6e9-bd551577e9d8

TODO
plugins/admin/departments/class_departmentGeneric.inc
plugins/admin/fai/class_faiTemplateEntry.inc
plugins/admin/groups/class_groupGeneric.inc

diff --git a/TODO b/TODO
index b5f4193e6d649991f435fa10a3cb063c31fa7936..096a30b3ddb2a443c6d5f938e03c1f121c92741f 100644 (file)
--- a/TODO
+++ b/TODO
@@ -3,8 +3,6 @@ Target for 2.4.1:
 
 * Sanity check for workstations/servers: repository server == self?
 
-* Can't rename server objects
-
 * Can't remove phoneAccounts...
 
 * Explaination of several FIXME's. Group removal, etc.
@@ -44,7 +42,7 @@ Target for 2.4.1:
 
 * template is not found in LDAP anymore - even if present
 
-* Base in User -> Posix -> Group add is dropped
+* groups -> user -> directory -> does not show all users
 
 
 Target for 2.5:
index e3b18157753c546fc32da823470c5f1954d3471a..60d4bc379d3c1ff935ddfa66f79a96cc6dbb9e4c 100644 (file)
@@ -64,7 +64,7 @@ class department extends plugin
                if ($this->dn == "new"){
                        $ui= get_userinfo();
                        if(isset($_SESSION['CurrentMainBase'])){
-                               $this->base = $_SESSION['CurrentMainBase'];
+                               $this->base= $_SESSION['CurrentMainBase'];
                        }else{
                                $this->base= dn2base($ui->dn);
                        }
index 34ee7a74412dc571c31e2939786f159f09265476..b387581e79768eed81e4311c7ce6be97361d0789 100644 (file)
@@ -31,6 +31,7 @@ class faiTemplateEntry extends plugin
   function faiTemplateEntry ($config, $dn= NULL,$object=false)
   {
     plugin::plugin ($config, $dn);
+
     if($dn != "new"){
       $this->orig_cn= $object['cn'];
       $this->dn=$object['dn'];
@@ -47,6 +48,7 @@ class faiTemplateEntry extends plugin
       $this->status = "new";
       $this->orig_cn       = false;
     }
+
     $this->user = explode( '.', $this->FAIowner );
     $this->group = $this->user[1];
     $this->user = $this->user[0];
@@ -57,6 +59,7 @@ class faiTemplateEntry extends plugin
     $this->FAImode= sprintf("%0.4s", $this->FAImode)." ";
   }
 
+
   function execute()
   {
        /* Call parent execute */
index 92f87d265ef5a3d06a1f6cd2bd2481b38d367adf..e0608fa200c659d587ce02669970aaa8ec825194 100644 (file)
@@ -153,19 +153,16 @@ class group extends plugin
 
     register_global('gufilter',$gufilter);
   
-      /* Bases / Departments */
-      
-    if(isset($_SESSION['CurrentMainBase'])){
-      $this->base = $_SESSION['CurrentMainBase'];
-    }else{
-      if ($this->dn == "new"){
+    if ($this->dn == "new"){
+      if(isset($_SESSION['CurrentMainBase'])){
+        $this->base= $_SESSION['CurrentMainBase'];
+      }else{
         $ui= get_userinfo();
         $this->base= dn2base($ui->dn);
-      } else {
-        $this->base= preg_replace ("/^[^,]+,[^,]+,/", "", $this->dn);
       }
+    } else {
+      $this->base= preg_replace ("/^[^,]+,[^,]+,/", "", $this->dn);
     }
-    
 
     /* This is always an account */
     $this->is_account= TRUE;
@@ -427,6 +424,7 @@ class group extends plugin
     $MaxUser = $this->OnlyShowFirstEntries;
 
     $gufilter= get_global("gufilter");
+    //FIXME: Why these multiple cd's? They are senseless.
     $ldap->cd ($this->config->current['BASE']);
     if($gufilter['SubSearchGroup']){
       $ldap->cd ($gufilter['dselect']);
@@ -759,6 +757,7 @@ class group extends plugin
       $ldap= $this->config->get_ldap_link();
       if(($this->cn  != $this->orig_cn) || ($this->orig_dn == "new")){
         $ldap->cd("ou=groups,".$this->base);
+        //FIXME: hardcoded ou=groups,
         $ldap->ls("(&(|(objectClass=gosaGroupOfNames)(objectClass=posixGroup))(cn=$this->cn))","ou=groups,".$this->base,array("cn"));
         if ($ldap->count() != 0){
           $message[]= _("Value specified as 'Name' is already used.");