Code

Fixed userPassword ACL check
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 23 Oct 2008 08:49:33 +0000 (08:49 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 23 Oct 2008 08:49:33 +0000 (08:49 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12761 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/systems/admin/systems/class_componentGeneric.inc
gosa-plugins/systems/admin/systems/class_divListSystem.inc
gosa-plugins/systems/admin/systems/class_servGeneric.inc
gosa-plugins/systems/admin/systems/class_systemManagement.inc

index 97cf914dac6781a14278afb32b102a691cb50c62..a03b57adfdb0bfa037861ad9b81081ba078f7378 100644 (file)
@@ -317,7 +317,8 @@ class componentGeneric extends plugin
           "plProvidedAcls"=> array(
             "cn"                  => _("Name"),
             "base"                => _("Base"),
-            "description"         => _("Description"))
+            "description"         => _("Description"),
+            "gotoRootPasswd"      => _("Root password"))
           ));
   }
 
index fdfc455de453d7847e60c41f82f3ccf0221deb37..68f4fd26ed45fb7ec3b801afa9cb4e45bb0408f7 100644 (file)
@@ -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 = "<input class='center' type='image' src='images/lists/key.png' alt='"._("Password")."'   name='system_setpwd_%KEY%' title='"._("Set password")."'>";
       }else{
index 3257f7025f09345bd1f0d405add1af79d1d0604d..0cd22e2397279e15f85832db50cd49a4adf63c0f 100644 (file)
@@ -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"))
           ));
   }
 }
index ea74772a0c4751a85120467bebf4eb93bdd5f78f..d4b6dc800fcc16b0b9e774378ca1ee8b606a135d 100644 (file)
@@ -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");
             }