Code

Fixed base acl.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 2 Nov 2006 07:39:31 +0000 (07:39 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 2 Nov 2006 07:39:31 +0000 (07:39 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4983 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/generic/class_user.inc

index e37f606770e1db45fda51e5f97106e51d6245e00..816c3166c7fd19d3a22ffde65ba2e9ef0666850e 100644 (file)
@@ -501,15 +501,13 @@ class user extends plugin
 
     /* Create base acls */
     $baseACL = $this->getacl("base",(!is_object($this->parent) && !isset($_SESSION['edit'])));
-    if(!$this->acl_is_moveable()) {
+    if($this->dn == "new" && !$this->acl_is_createable()) {
+      $baseACL = preg_replace("/w/","",$baseACL);
+    }elseif($this->dn != "new" && !$this->acl_is_moveable()) {
       $baseACL = preg_replace("/w/","",$baseACL);
     }
     $smarty->assign("baseACL",          $baseACL);
-
-    /* Show us the edit screen */
     @$smarty->assign("bases", $this->allowedBasesToMoveTo());
-   #  $smarty->assign("bases", $this->config->idepartments);
-
 
     /* Save government mode attributes */
     if (isset($this->config->current['GOVERNMENTMODE']) &&
@@ -993,7 +991,7 @@ class user extends plugin
       $message[]= _("You have no permissions to create a user on this 'Base'.");
     } elseif ($this->dn != $new_dn && $this->dn != "new"){
       if (!$this->acl_is_writeable($this->dn, "user","create",(!is_object($this->parent) && !isset($_SESSION['edit'])))){
-        $message[]= _("You have no permissions to move a user from the original 'Base'.");
+        $message[]= _("You have no permissions to move this user to the spicified 'Base'.");
       }
     }