diff --git a/plugins/admin/systems/class_serverService.inc b/plugins/admin/systems/class_serverService.inc
index 63859818497e71d153566a1bdbb4b60200209f07..c6fe5415b98048d84e02d6bb63c32bd89dd97ce7 100644 (file)
$this->divList = new divListSystemService($config,$this);
}
$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()
{
function execute()
{
/* Remove service */
if($s_action == "RemoveSingleService"){
/* 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;
+ }
}
}
if(isset($_POST['CancelService'])){
if($this->backup == NULL){
$this->plugins[$this->current] = new $this->current($this->config,$this->dn);
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;
}else{
foreach($this->backup as $name => $value){
$this->plugins[$this->current]->$name = $value;
}
}
}
}
}
}
+
+ /* Only show createable services */
+ if(!$obj->acl_is_createable()){
+ $skip = true;
+ }
+
if(!$skip){
if(isset($obj->DisplayName)){
$ret[$name] = $obj->DisplayName;
if(!$skip){
if(isset($obj->DisplayName)){
$ret[$name] = $obj->DisplayName;