Code

Fixecd department acls
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 6 Sep 2006 09:01:00 +0000 (09:01 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 6 Sep 2006 09:01:00 +0000 (09:01 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4603 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/departments/class_departmentGeneric.inc
plugins/admin/departments/tabs_department.inc

index 58052612ea5b0f281e1bae3784d34cbbd7f022c0..582a9edc2fee58869d7a338815e3c753a2854980 100644 (file)
@@ -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'.");
                }
 
index d3e0d50ea06aa0eacc892aca0ab07eeb9bcc9011..9e3f6675bd435d75c7d2b63d27be774d3adf3635 100644 (file)
@@ -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 */