From: hickert Date: Fri, 20 May 2005 11:31:41 +0000 (+0000) Subject: hide fields that cant be edited /Databases/services X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8be27fa58941deb51e7c48539c41c3b6bfb70617;p=gosa.git hide fields that cant be edited /Databases/services git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@277 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_servDB.inc b/plugins/admin/systems/class_servDB.inc index 254f90597..7a35f41db 100644 --- a/plugins/admin/systems/class_servDB.inc +++ b/plugins/admin/systems/class_servDB.inc @@ -79,7 +79,7 @@ class servdb extends plugin } else { $smarty->assign("$oc", ""); - $smarty->assign("$oc"."ACL", ""); + $smarty->assign("$oc"."ACL", chkacl($this->acl, $oc)); $smarty->assign("$oc"."State", "disabled"); } } @@ -200,6 +200,7 @@ class servdb extends plugin $this->attrs = array_reverse($this->attrs); + /* Write to LDAP */ $ldap= $this->config->get_ldap_link(); $ldap->cd($this->dn); diff --git a/plugins/admin/systems/class_servKolab.inc b/plugins/admin/systems/class_servKolab.inc index fa46d5a03..43cdbd8db 100644 --- a/plugins/admin/systems/class_servKolab.inc +++ b/plugins/admin/systems/class_servKolab.inc @@ -199,12 +199,12 @@ class servkolab extends plugin { if(empty($this->postfix_mynetworks)) { - $message[] = _("SMTP privileged networks -> No value is given."); + ;//$message[] = _("SMTP privileged networks -> No value is given."); } if(empty($this->postfix_relayhost)) { - $message[] = _("SMTP smarthost/relayhost -> No value is given."); + ;//$message[] = _("SMTP smarthost/relayhost -> No value is given."); } diff --git a/plugins/admin/systems/class_servService.inc b/plugins/admin/systems/class_servService.inc index b596f22cb..0af905aa2 100644 --- a/plugins/admin/systems/class_servService.inc +++ b/plugins/admin/systems/class_servService.inc @@ -138,10 +138,7 @@ class servservice extends plugin foreach ($this->attributes as $attr){ $smarty->assign("$attr", $this->$attr); $smarty->assign("$attr"."ACL", chkacl($this->acl, $attr)); - if($this->$attr) - $smarty->assign($attr."State",""); - else - $smarty->assign($attr."State","disabled"); + $smarty->assign($attr."State",""); } @@ -154,7 +151,7 @@ foreach ($this->additionaloc as $oc => $dummy){ } else { $smarty->assign("$oc", ""); - $smarty->assign("$oc"."ACL", ""); + $smarty->assign("$oc"."ACL", chkacl($this->acl, $oc)); $smarty->assign("$oc"."State", "disabled"); } } @@ -237,9 +234,21 @@ foreach ($this->additionaloc as $oc => $dummy){ } } $this->attrs = array_reverse($this->attrs); + + /* Check if we are able to set these attributes */ +#fixme : It Would be better to check ObjectClass rights to, but what is to do if there are insuficient rights + foreach($this->additionaloc as $oc => $attrs) + { + foreach($attrs as $val) + { + if(chkacl($this->acl,$val)=="") + { + unset($this->attrs[$val]); + unset($this->$val); + } + } + } -// print_a($this->attrs); - /* Write to LDAP */ $ldap= $this->config->get_ldap_link(); $ldap->cd($this->dn); @@ -253,7 +262,6 @@ foreach ($this->additionaloc as $oc => $dummy){ } else { $this->handle_post_events("add"); } - } } diff --git a/plugins/admin/systems/servservice.tpl b/plugins/admin/systems/servservice.tpl index c938c2224..69589164e 100644 --- a/plugins/admin/systems/servservice.tpl +++ b/plugins/admin/systems/servservice.tpl @@ -12,13 +12,13 @@
- {html_options values=$goExportEntry output=$goExportEntry}
- - + +
@@ -37,13 +37,13 @@
- {html_options values=$goTimeSource output=$goTimeSource}
- - + +
@@ -58,7 +58,7 @@ {t}LDAP Service{/t} - +

 


@@ -72,11 +72,11 @@ + {t}Temporary disable login{/t} - +
- {t}Temporary disable login{/t}
{t}Font path{/t}