Code

Fixed acls
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 20 Sep 2006 04:16:31 +0000 (04:16 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 20 Sep 2006 04:16:31 +0000 (04:16 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4732 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_servGeneric.inc

index 34397aea6ff261d0f03dc6b5dbac357620df146e..beb041887b4a97d1abf407145784a195dabc16d3 100644 (file)
@@ -69,7 +69,7 @@ class servgeneric extends plugin
     }
 
     /* Check for action */
-    if (isset($_POST['action'])){
+    if (isset($_POST['action']) && $this->acvl_is_writeable("FAIstate")){
       $cmd= search_config($this->config->data['TABS'], "workgeneric", "ACTIONCMD");
       if ($cmd == ""){
         print_red(_("No ACTIONCMD definition found in your gosa.conf"));
@@ -116,9 +116,9 @@ class servgeneric extends plugin
     /* Base select dialog */
     $once = true;
     foreach($_POST as $name => $value){
-      if(preg_match("/^chooseBase/",$name) && $once){
+      if(preg_match("/^chooseBase/",$name) && $once && $this->acl_is_moveable()){
         $once = false;
-        $this->dialog = new baseSelectDialog($this->config,$this);
+        $this->dialog = new baseSelectDialog($this->config,$this,$this->get_allowed_bases());
         $this->dialog->setCurrentBase($this->base);
       }
     }
@@ -153,7 +153,7 @@ class servgeneric extends plugin
     }
     $smarty->assign("baseACL",          $baseACL);
 
-    $smarty->assign("bases", $this->config->idepartments);
+    $smarty->assign("bases", $this->get_allowed_bases());
 
     /* Assign attributes */
     foreach ($this->attributes as $attr){
@@ -193,6 +193,11 @@ class servgeneric extends plugin
 
   function remove_from_parent()
   {
+    /* Cancel if there's nothing to do here */
+    if ((!$this->initially_was_account) || (!$this->acl_is_removeable())){
+      return;
+    }
+
     $this->netConfigDNS->remove_from_parent();
     $ldap= $this->config->get_ldap_link();
     $ldap->rmdir($this->dn);