From: hickert Date: Thu, 23 Oct 2008 08:49:33 +0000 (+0000) Subject: Fixed userPassword ACL check X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8936c203354b235e310ac58281614b3b862b9d73;p=gosa.git Fixed userPassword ACL check git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12761 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/systems/admin/systems/class_componentGeneric.inc b/gosa-plugins/systems/admin/systems/class_componentGeneric.inc index 97cf914da..a03b57adf 100644 --- a/gosa-plugins/systems/admin/systems/class_componentGeneric.inc +++ b/gosa-plugins/systems/admin/systems/class_componentGeneric.inc @@ -317,7 +317,8 @@ class componentGeneric extends plugin "plProvidedAcls"=> array( "cn" => _("Name"), "base" => _("Base"), - "description" => _("Description")) + "description" => _("Description"), + "gotoRootPasswd" => _("Root password")) )); } diff --git a/gosa-plugins/systems/admin/systems/class_divListSystem.inc b/gosa-plugins/systems/admin/systems/class_divListSystem.inc index fdfc455de..68f4fd26e 100644 --- a/gosa-plugins/systems/admin/systems/class_divListSystem.inc +++ b/gosa-plugins/systems/admin/systems/class_divListSystem.inc @@ -345,7 +345,7 @@ class divListSystem extends MultiSelectWindow /* Check if this is a terminal/workstation && if we are allowed to change the gotoRootPasswd */ $display_key_for = array("terminal","workstation","server","component"); - $pwd_acl = $ui->get_permissions($val['dn'],$tabs[$type]['ACL'],"userPassword"); + $pwd_acl = $ui->get_permissions($val['dn'],$tabs[$type]['ACL'],"gotoRootPasswd"); if(preg_match("/w/",$pwd_acl) && in_array($type,$display_key_for)){ $action2 = ""; }else{ diff --git a/gosa-plugins/systems/admin/systems/class_servGeneric.inc b/gosa-plugins/systems/admin/systems/class_servGeneric.inc index 3257f7025..0cd22e239 100644 --- a/gosa-plugins/systems/admin/systems/class_servGeneric.inc +++ b/gosa-plugins/systems/admin/systems/class_servGeneric.inc @@ -509,11 +509,13 @@ class servgeneric extends plugin "plCategory" => array("server" => array("description" => _("Server"), "objectClass" => "goServer")), "plProvidedAcls"=> array( - "cn" => _("Name"), - "description" => _("Description"), - "gotoMode" => _("Goto mode"), - "base" => _("Base"), - "FAIstate" => _("Action flag")) + "cn" => _("Name"), + "description" => _("Description"), + "base" => _("Base"), + + "gotoMode" => _("Goto mode"), + "gotoRootPasswd"=> _("Root password"), + "FAIstate" => _("Action flag")) )); } } diff --git a/gosa-plugins/systems/admin/systems/class_systemManagement.inc b/gosa-plugins/systems/admin/systems/class_systemManagement.inc index ea74772a0..d4b6dc800 100644 --- a/gosa-plugins/systems/admin/systems/class_systemManagement.inc +++ b/gosa-plugins/systems/admin/systems/class_systemManagement.inc @@ -587,7 +587,7 @@ class systems extends plugin $acl = $tabs[$type]["ACL"]; $tabclass = $tabs[$type]["TABCLASS"]; $ui = get_userinfo(); - $tabacl = $ui->get_permissions($dn,$acl,"userPassword"); + $tabacl = $ui->get_permissions($dn,$acl,"gotoRootPasswd"); if(preg_match("/w/",$tabacl)){ $this->dn= $this->terminals[$s_entry]['dn']; session::set('objectinfo',$this->dn); @@ -634,14 +634,13 @@ class systems extends plugin if(!empty($type) && in_array($type,$allow_for)){ /* Get infos */ - $plug = $tabs[$type]["PLUG"]; - $class = $tabs[$type]["CLASS"]; + $plug = $tabs[$type]["TABNAME"]; $acl = $tabs[$type]["ACL"]; $tabclass = $tabs[$type]["TABCLASS"]; - + /* Get acls */ $ui = get_userinfo(); - $tabacl = $ui->get_permissions($this->dn,$acl,"userPassword"); + $tabacl = $ui->get_permissions($this->dn,$acl,"gotoRootPasswd"); /* Check acls */ if(preg_match("/w/",$tabacl)){ @@ -689,7 +688,7 @@ class systems extends plugin if (!$ldap->success()){ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, $type)); }else{ - if(class_available($plug)){ + if(class_available($plug)){ $p = new $plug($this->config,$this->dn); $p->handle_post_events("modify"); }