index ed44e8ea46b873609ce008b4eac4352f98b23ce1..7b79378f378894218e6a5fdc23e9752f1204781d 100644 (file)
if (isset($this->attrs['member'])){
foreach ($this->attrs['member'] as $key => $value){
if ("$key" != "count"){
+ $value= @LDAP::convert($value);
$this->member["$value"]= "$value";
}
}
$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"]);
}
/* 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;
}
/* 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];
/* 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);
}
/* Add objects? */
- if (isset($_POST["edit_membership"])){
+ if (isset($_POST["edit_membership"]) && chkacl($this->acl,"gosaGroupObjects") == ""){
$this->group_dialog= TRUE;
$this->dialog= TRUE;
}
}
/* 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 == "[]"){
if (chkacl ($this->acl, "base") == "" && isset($_POST["base"])){
$this->base= $_POST["base"];
}
-
}
}
$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"){
foreach ($input as $key => $value){
/* Generate output */
- $temp.= "<option value=\"$key\" class=\"select\" style=\"background-image:url('".get_template_path("images/".$conv[$value['type']])."');\">".$value['text']."</option>\n";
+ $temp.= "<option title='".addslashes($key)."' value=\"$key\" class=\"select\" style=\"background-image:url('".get_template_path("images/".$conv[$value['type']])."');\">".$value['text']."</option>\n";
}
return ($temp);
$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'.");
}