Code

Updated serverservice, only allow remove if permitted
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 20 Sep 2006 04:25:49 +0000 (04:25 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 20 Sep 2006 04:25:49 +0000 (04:25 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4734 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_serverService.inc

index 63859818497e71d153566a1bdbb4b60200209f07..514563c8a9a356d96616688cc3ce3cfc442884ca 100644 (file)
@@ -103,8 +103,15 @@ class ServerService extends plugin
 
     /* Remove service */
     if($s_action == "RemoveSingleService"){
-      $this->plugins[$s_entry] = new $s_entry($this->config,$this->dn);
-      $this->plugins[$s_entry]->is_account = false;
+
+      /* Create resetted obj */
+      $new_obj = new $s_entry($this->config,$this->dn);
+      $tmp     = $new_obj->getListEntry();
+
+      if($tmp['AllowRemove']){
+        $this->plugins[$s_entry] = new $s_entry($this->config,$this->dn);
+        $this->plugins[$s_entry]->is_account = false;
+      }
     }