From: cajus Date: Tue, 18 Apr 2006 11:56:00 +0000 (+0000) Subject: Fixed problem with moving groups X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=921661a80740d2f5a6d0057c65b4666eecfea317;p=gosa.git Fixed problem with moving groups git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3051 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/TODO b/TODO index b5f4193e6..096a30b3d 100644 --- 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: diff --git a/plugins/admin/departments/class_departmentGeneric.inc b/plugins/admin/departments/class_departmentGeneric.inc index e3b181577..60d4bc379 100644 --- a/plugins/admin/departments/class_departmentGeneric.inc +++ b/plugins/admin/departments/class_departmentGeneric.inc @@ -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); } diff --git a/plugins/admin/fai/class_faiTemplateEntry.inc b/plugins/admin/fai/class_faiTemplateEntry.inc index 34ee7a744..b387581e7 100644 --- a/plugins/admin/fai/class_faiTemplateEntry.inc +++ b/plugins/admin/fai/class_faiTemplateEntry.inc @@ -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 */ diff --git a/plugins/admin/groups/class_groupGeneric.inc b/plugins/admin/groups/class_groupGeneric.inc index 92f87d265..e0608fa20 100644 --- a/plugins/admin/groups/class_groupGeneric.inc +++ b/plugins/admin/groups/class_groupGeneric.inc @@ -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.");