diff --git a/plugins/admin/departments/class_departmentGeneric.inc b/plugins/admin/departments/class_departmentGeneric.inc
index 582a9edc2fee58869d7a338815e3c753a2854980..3b6daee52d8093460ba9b38e69918c1bd64a7a11 100644 (file)
$smarty->assign($name."ACL",$this->getacl($name));
}
- /* Get bases */
- $ui = get_userinfo();
- $check = $ui->get_module_departments("department");
- $check[] = $this->base;
- $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) && ($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 ($this->acl_is_createable() && $this->dn != "new"){
+ 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"),