summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 13ef87f)
raw | patch | inline | side by side (parent: 13ef87f)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 17 Mar 2010 12:31:15 +0000 (12:31 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 17 Mar 2010 12:31:15 +0000 (12:31 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16749 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/admin/departments/class_department.inc | patch | blob | history | |
gosa-core/plugins/admin/departments/tabs_department.inc | patch | blob | history |
diff --git a/gosa-core/plugins/admin/departments/class_department.inc b/gosa-core/plugins/admin/departments/class_department.inc
index 9e817d55dbb92d319e5e205b2c1d836581d7ad61..277f6e674370b03e88966c8a819ec37a8ab6fe2c 100644 (file)
var $initially_was_tagged = false;
var $orig_base = "";
var $orig_ou = "";
+ var $orig_dn = "";
var $baseSelector;
var $manager_enabled = FALSE;
var $manager_name ="";
var $manager ="";
+ var $is_root_dse = FALSE;
+
function department (&$config, $dn)
{
/* Add the default structural obejct class 'locality' if this is a new entry
$this->base= preg_replace ("/^[^,]+,/", "", $this->dn);
}
+ // Special handling for the rootDSE
+ if($this->dn == $this->config->current['BASE']){
+ $this->base = $this->dn;
+ $this->is_root_dse = TRUE;
+ }
+
$this->orig_base = $this->base;
/* Is administrational Unit? */
/* Hide base selector, if this object represents the base itself
*/
- $smarty->assign("is_root_dse", FALSE);
- if($this->dn == $this->config->current['BASE']){
- $smarty->assign("is_root_dse", TRUE);
- $nA = $this->namingAttr."ACL";
- $smarty->assign($nA,$this->getacl($this->namingAttr,TRUE));
- }
+ $smarty->assign("is_root_dse", $this->is_root_dse);
+ $nA = $this->namingAttr."ACL";
+ $smarty->assign($nA,$this->getacl($this->namingAttr,TRUE));
/* Hide all departments, that are subtrees of this department */
$bases = $this->get_allowed_bases();
diff --git a/gosa-core/plugins/admin/departments/tabs_department.inc b/gosa-core/plugins/admin/departments/tabs_department.inc
index 1c37179d2517d4737cbe51ebafff3339ccf76be8..6d80aef4dec7e7e273f7ea4427dd0b15f6df45ed 100644 (file)
$nAV = preg_replace('/"/', '\"', $nAV);
$new_dn = @LDAP::convert($namingAttr.'='.$nAV.','.$baseobject->base);
+ // Do not try to move the root DSE
+ if($baseobject->is_root_dse){
+ $new_dn = $baseobject->orig_dn;
+ }
+
/* Move group? */
if ($this->dn != $new_dn && $this->dn != "new"){
$baseobject->move($this->dn,$new_dn);