From 13cdbceae5340a268cc174dc5c3a1b91dfbdf02f Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 6 Sep 2006 09:01:00 +0000 Subject: [PATCH] Fixecd department acls git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4603 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/departments/class_departmentGeneric.inc | 7 ++++--- plugins/admin/departments/tabs_department.inc | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/plugins/admin/departments/class_departmentGeneric.inc b/plugins/admin/departments/class_departmentGeneric.inc index 58052612e..582a9edc2 100644 --- a/plugins/admin/departments/class_departmentGeneric.inc +++ b/plugins/admin/departments/class_departmentGeneric.inc @@ -103,7 +103,8 @@ class department extends plugin /* Get bases */ $ui = get_userinfo(); - $check = $ui->get_module_departments("groups"); + $check = $ui->get_module_departments("department"); + $check[] = $this->base; $bases = array(); foreach($check as $dn_allowed){ $bases[$dn_allowed] = $this->config->idepartments[$dn_allowed]; @@ -112,7 +113,7 @@ class department extends plugin /* 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->setCurrentBase($this->base); @@ -227,7 +228,7 @@ class department extends plugin /* 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'."); } diff --git a/plugins/admin/departments/tabs_department.inc b/plugins/admin/departments/tabs_department.inc index d3e0d50ea..9e3f6675b 100644 --- a/plugins/admin/departments/tabs_department.inc +++ b/plugins/admin/departments/tabs_department.inc @@ -4,9 +4,9 @@ class deptabs extends tabs { var $base= ""; - function deptabs($config, $data, $dn) + function deptabs($config, $data, $dn,$category) { - tabs::tabs($config, $data, $dn); + tabs::tabs($config, $data, $dn,$category); $this->base= $this->by_object['department']->base; /* Add references/acls/snapshots */ -- 2.30.2