X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=plugins%2Fadmin%2Fogroups%2Fclass_termgroup.inc;h=4b2e746954c385b7dbadc3909b26837b25aff416;hb=90cb0cbd940168e234d506e42644e52fc7af5c4d;hp=967ebc6f836f65699aff134e0394f1c74ecb3bd9;hpb=b034f9b35a7b197429c063af707e5a20297660ac;p=gosa.git diff --git a/plugins/admin/ogroups/class_termgroup.inc b/plugins/admin/ogroups/class_termgroup.inc index 967ebc6f8..4b2e74695 100644 --- a/plugins/admin/ogroups/class_termgroup.inc +++ b/plugins/admin/ogroups/class_termgroup.inc @@ -27,14 +27,15 @@ class termgroup extends plugin "memcheck" => "memcheck", "sysinfo" => "sysinfo"); + var $CopyPasteVars = array("gotoNtpServers","modes","inheritTimeServer"); - function termgroup ($config, $dn= NULL) + function termgroup ($config, $dn= NULL, $parent= NULL) { /*************** Some initialisations ***************/ - plugin::plugin($config, $dn); + plugin::plugin($config, $dn, $parent); $ldap= $config->get_ldap_link(); @@ -141,22 +142,21 @@ class termgroup extends plugin function update_term_member_FAIstate($act) { /* Get required informations */ - $og = $this->parent->by_object['ogroup']; - $allobs = $og->allobjects; - $mem = $og->member; + $og = $this->parent->by_object['ogroup']; + $allobs= $og->objcache; /* Get correct value for FAIstate */ - $action = $this->mapActions[$act]; + $action= $this->mapActions[$act]; /* Get ldap connection */ - $ldap = $this->config->get_ldap_link(); + $ldap= $this->config->get_ldap_link(); $ldap->cd ($this->config->current['BASE']); /* Foreach member of mthis ogroup ... */ - foreach($mem as $key ){ + foreach($og->member as $key ){ /* check objectClasses and create attributes array */ - $attrs = array("FAIstate"=>$action); + $attrs = array("FAIstate" => $action); for($i = 0; $i < $allobs[$key]['objectClass']['count'] ; $i ++){ $attrs['objectClass'][] = $allobs[$key]['objectClass'][$i]; } @@ -202,7 +202,7 @@ class termgroup extends plugin $names.= "$cn "; } - if (isset($_POST['action'])){ + if (isset($_POST['action']) && $this->acl == "#all#"){ /* Update members fai state */ $this->update_term_member_FAIstate(trim($_POST['saction'])); @@ -227,12 +227,12 @@ class termgroup extends plugin ***************/ /* Add new ntp Server to our list */ - if((isset($_POST['addNtpServer'])) && (isset($_POST['gotoNtpServers']))){ + if((isset($_POST['addNtpServer'])) && (isset($_POST['gotoNtpServers'])) && $this->acl == "#all#"){ $this->gotoNtpServer[$_POST['gotoNtpServers']] = $_POST['gotoNtpServers']; } /* Delete selected NtpServer for list of used servers */ - if((isset($_POST['delNtpServer'])) && (isset($_POST['gotoNtpServerSelected']))){ + if((isset($_POST['delNtpServer'])) && (isset($_POST['gotoNtpServerSelected'])) && $this->acl == "#all#"){ foreach($_POST['gotoNtpServerSelected'] as $name){ unset($this->gotoNtpServer[$name]); }