diff --git a/plugins/admin/departments/class_departmentGeneric.inc b/plugins/admin/departments/class_departmentGeneric.inc
index 58052612ea5b0f281e1bae3784d34cbbd7f022c0..3b6daee52d8093460ba9b38e69918c1bd64a7a11 100644 (file)
$smarty->assign($name."ACL",$this->getacl($name));
}
- /* Get bases */
- $ui = get_userinfo();
- $check = $ui->get_module_departments("groups");
- $bases = array();
- foreach($check as $dn_allowed){
- $bases[$dn_allowed] = $this->config->idepartments[$dn_allowed];
- }
-
/* Base select dialog */
$once = true;
foreach($_POST as $name => $value){
- if(preg_match("/^chooseBase/",$name) && $once){
+ if((preg_match("/^chooseBase/",$name) && $once) && ($this->acl_is_moveable())){
$once = false;
- $this->dialog = new baseSelectDialog($this->config,$this,$bases);
+ $this->dialog = new baseSelectDialog($this->config,$this,$this->get_allowed_bases());
$this->dialog->setCurrentBase($this->base);
}
}
}
/* Hide all departments, that are subtrees of this department */
+ $bases = $this->get_allowed_bases();
if(($this->dn == "new")||($this->dn == "")){
$tmp = $bases;
}else{
/* Permissions for that base? */
// $this->dn= "ou=$this->ou,".$this->base;
- if (chkacl($this->acl, "create") != ""){
+ if ($this->acl_is_createable() && $this->dn == "new"){
$message[]= _("You have no permissions to create a department on this 'Base'.");
}
"plProvidedAcls" => array(
"description" => _("Description"),
"c" => _("Country"),
+ "base" => _("Base"),
"l" => _("Location"),
"telephoneNumber" => _("Telephone"),
"ou" => _("Department name"),