Code

<h2> => </h3>
[gosa.git] / gosa-core / plugins / admin / acl / class_aclRole.inc
index 5b90c32a8852677fc631127c394f81893ae6541f..51f19e973dd30bf1252848789c3c7bfa098d4ac6 100644 (file)
@@ -62,7 +62,8 @@ class aclrole extends acl
     plugin::plugin($config, $dn);
 
     if($this->dn == "new"){
-      $this->base  = session::get('CurrentMainBase');
+      $ui = get_userinfo();
+      $this->base= dn2base(session::global_is_set("CurrentMainBase")?"cn=test,".session::global_get("CurrentMainBase"):$ui->dn);
     }else{
       $this->base = preg_replace("/^[^,]+,[^,]+,/","",$this->dn);
       new log("view","acl/".get_class($this),$this->dn);
@@ -760,6 +761,11 @@ class aclrole extends acl
     if(!count($this->gosaAclTemplate)){
       $message[] = msgPool::required(_("ACL"));
     }
+
+    // Check if a wrong base was supplied
+    if(!$this->baseSelector->checkLastBaseUpdate()){
+      $message[]= msgPool::check_base();;
+    }
  
     /* Check if we are allowed to create or move this object
      */