X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fadmin%2Fogroups%2Fclass_ogroup.inc;h=7b79378f378894218e6a5fdc23e9752f1204781d;hb=1e220f70c31a04aa91e49ec9b6d16db1aec3b729;hp=ed44e8ea46b873609ce008b4eac4352f98b23ce1;hpb=b9a665f8e5359cbfdf540f344f0419668521027f;p=gosa.git diff --git a/plugins/admin/ogroups/class_ogroup.inc b/plugins/admin/ogroups/class_ogroup.inc index ed44e8ea4..7b79378f3 100644 --- a/plugins/admin/ogroups/class_ogroup.inc +++ b/plugins/admin/ogroups/class_ogroup.inc @@ -46,6 +46,7 @@ class ogroup extends plugin if (isset($this->attrs['member'])){ foreach ($this->attrs['member'] as $key => $value){ if ("$key" != "count"){ + $value= @LDAP::convert($value); $this->member["$value"]= "$value"; } } @@ -110,7 +111,7 @@ class ogroup extends plugin $this->reload(); }else{ /* Delete objects from group */ - if (isset($_POST['delete_membership']) && isset($_POST['members'])){ + if (isset($_POST['delete_membership']) && isset($_POST['members']) && chkacl($this->acl,"gosaGroupObjects") == ""){ foreach ($_POST['members'] as $value){ $this->objects["$value"]= $this->memberList[$value]; unset ($this->memberList["$value"]); @@ -122,7 +123,7 @@ class ogroup extends plugin } /* Add objects to group */ - if (isset($_POST['add_object_finish']) && isset($_POST['objects'])){ + if (isset($_POST['add_object_finish']) && isset($_POST['objects']) && chkacl($this->acl,"gosaGroupObjects") == ""){ foreach ($_POST['objects'] as $value){ $this->memberList["$value"]= $this->objects[$value]; $this->member["$value"]= $value; @@ -150,7 +151,7 @@ class ogroup extends plugin } /* Delete objects from group */ - if (isset($_POST['delete_membership']) && isset($_POST['members'])){ + if (isset($_POST['delete_membership']) && isset($_POST['members']) && chkacl($this->acl,"gosaGroupObjects") == ""){ foreach ($_POST['members'] as $value){ if(isset($this->memberList[$value])){ $this->objects["$value"]= $this->memberList[$value]; @@ -183,7 +184,7 @@ class ogroup extends plugin /* Base select dialog */ $once = true; foreach($_POST as $name => $value){ - if(preg_match("/^chooseBase/",$name) && $once){ + if(preg_match("/^chooseBase/",$name) && $once && chkacl($this->acl,"base") == ""){ $once = false; $this->dialog = new baseSelectDialog($this->config); $this->dialog->setCurrentBase($this->base); @@ -206,7 +207,7 @@ class ogroup extends plugin } /* Add objects? */ - if (isset($_POST["edit_membership"])){ + if (isset($_POST["edit_membership"]) && chkacl($this->acl,"gosaGroupObjects") == ""){ $this->group_dialog= TRUE; $this->dialog= TRUE; } @@ -271,10 +272,9 @@ class ogroup extends plugin } /* Bases / Departments */ - - if (isset($_POST['base'])){ - $this->base= $_POST['base']; - } + if (isset($_POST['base']) && chkacl($this->acl,"base") == ""){ + $this->base= $_POST['base']; + } /* Assemble combine string */ if ($this->gosaGroupObjects == "[]"){ @@ -338,7 +338,6 @@ class ogroup extends plugin if (chkacl ($this->acl, "base") == "" && isset($_POST["base"])){ $this->base= $_POST["base"]; } - } } @@ -479,7 +478,7 @@ class ogroup extends plugin $ldap= $this->config->get_ldap_link(); /* Try to resolv the entry again, if it still fails, display error msg */ - $ldap->cat($dn, array("cn", "sn", "givenName", "ou", "description", "objectClass")); + $ldap->cat($dn, array("cn", "sn", "givenName", "ou", "uid", "description", "objectClass")); /* It has failed, add entry with type flag I (Invalid)*/ if ($ldap->error != "Success"){ @@ -532,7 +531,7 @@ class ogroup extends plugin foreach ($input as $key => $value){ /* Generate output */ - $temp.= "\n"; + $temp.= "\n"; } return ($temp); @@ -609,7 +608,7 @@ class ogroup extends plugin $ui= get_userinfo(); $acl= get_permissions ($new_dn, $ui->subtreeACL); $acl= get_module_permission($acl, "group", $new_dn); - if (chkacl($acl, "create") != ""){ + if (chkacl($acl, "create") != "" && $this->dn=="new"){ $message[]= _("You have no permissions to create a group on this 'Base'."); }