X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fadmin%2Fsystems%2Fclass_serverService.inc;h=c6fe5415b98048d84e02d6bb63c32bd89dd97ce7;hb=9695395f399e680d3fbb0c6b7a2df7d8b37d17c8;hp=63859818497e71d153566a1bdbb4b60200209f07;hpb=77bc757eea39cc6d7d02d36885e1e9317d8e7c6c;p=gosa.git diff --git a/plugins/admin/systems/class_serverService.inc b/plugins/admin/systems/class_serverService.inc index 638598184..c6fe5415b 100644 --- a/plugins/admin/systems/class_serverService.inc +++ b/plugins/admin/systems/class_serverService.inc @@ -45,6 +45,21 @@ class ServerService extends plugin $this->divList = new divListSystemService($config,$this); } + function set_acl_base($base) + { + plugin::set_acl_base($base); + foreach($this->plugins as $name => $obj){ + $this->plugins[$name]->set_acl_base($base); + } + } + + function set_acl_category($category) + { + plugin::set_acl_category($category); + foreach($this->plugins as $name => $obj){ + $this->plugins[$name]->set_acl_category($category); + } + } function execute() { @@ -103,8 +118,17 @@ 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); + $new_obj -> set_acl_base($this->acl_base); + $new_obj -> set_acl_category(preg_replace("/\/$/","",$this->acl_category)); + $tmp = $new_obj->getListEntry(); + + if($tmp['AllowRemove']){ + $this->plugins[$s_entry] = $new_obj; + $this->plugins[$s_entry]->is_account = false; + } } @@ -130,6 +154,9 @@ class ServerService extends plugin if(isset($_POST['CancelService'])){ if($this->backup == NULL){ $this->plugins[$this->current] = new $this->current($this->config,$this->dn); + $this->plugins[$this->current]-> set_acl_base($this->acl_base); + $this->plugins[$this->current]-> set_acl_category(preg_replace("/\/$/","",$this->acl_category)); + }else{ foreach($this->backup as $name => $value){ $this->plugins[$this->current]->$name = $value; @@ -234,6 +261,12 @@ class ServerService extends plugin } } } + + /* Only show createable services */ + if(!$obj->acl_is_createable()){ + $skip = true; + } + if(!$skip){ if(isset($obj->DisplayName)){ $ret[$name] = $obj->DisplayName;