Code

Updated department handling
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 24 Jun 2008 13:50:26 +0000 (13:50 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 24 Jun 2008 13:50:26 +0000 (13:50 +0000)
-Do not allow to edit dcObjects.
-Fixed image titles.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11422 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/admin/departments/class_departmentManagement.inc
gosa-core/plugins/admin/departments/class_divListDepartment.inc

index 357331c49b387f5f2cd1dcd253d7e9a9f3173de3..2de4cf2b7f7ba8defda52ea728b515eef0b872af 100644 (file)
@@ -121,7 +121,7 @@ class departmentManagement extends plugin
       $objects['l'] ['TAB'] = "LOCALITY_TABS";
       $objects['o'] ['ACL'] = "organization";
       $objects['o'] ['TAB'] = "ORGANIZATION_TABS";
-    
+
       if(isset($objects[$s_entry])){
         $tab = $objects[$s_entry]['TAB'];
         $acl = $objects[$s_entry]['ACL'];
@@ -144,6 +144,7 @@ class departmentManagement extends plugin
 
       /* Possible department types
        */
+      $types['dcObject']           = array("ACL" => "",             "TAB" => "");
       $types['country']            = array("ACL" => "country",      "TAB" => "COUNTRY_TABS");
       $types['locality']           = array("ACL" => "locality",     "TAB" => "LOCALITY_TABS");
       $types['organizationalUnit'] = array("ACL" => "department",   "TAB" => "DEPTABS");
@@ -168,6 +169,8 @@ class departmentManagement extends plugin
        */
       if(!count($data)){
         trigger_error("Unknown department type skipped '".$this->dn."'.");
+      }elseif(empty($data['TAB'])){
+        // Do nothing, this object is currently not editable
       }else{
 
         if (($user= get_lock($this->dn)) != ""){
@@ -455,6 +458,10 @@ class departmentManagement extends plugin
 
     /* Possible department types 
      */ 
+    $types['dcObject']  = array("ACL" => "department",      "ATTR" => "dc",
+        "CLS" => "(objectClass=dcObject)",
+        "IMG"  => "plugins/departments/images/department.png");
+
     $types['country']            = array("ACL" => "country",      "ATTR" => "c",
         "CLS" => "(objectClass=country)",
         "IMG" => "plugins/departments/images/country.png", "ABBR" => "c");
@@ -474,6 +481,9 @@ class departmentManagement extends plugin
         "CLS" => "(objectClass=referal??)",
         "IMG" => "plugins/departments/images/country.png", "ABBR" => "referal");
 
+
     /* Create search filter for each department type
      */
     $res = array();
index 1b4f2e527f2792e90ac3d15a0da2b2c7c6f1c5b3..cc3835dec5b4a1403378f5a21897980023091a0c 100644 (file)
@@ -201,15 +201,19 @@ class divListDepartment extends MultiSelectWindow
   {
     $linkopen = "<a href='?plug=".$_GET['plug']."&amp;act=dep_open&amp;dep_id=%s'>%s</a>";
 
     /* Possible department types
      */
+   $types['dcObject']  = array("ACL" => "department",      "ATTR" => "dc",
+       "TITLE"     => _("Domain Component"),
+       "IMG_FULL"  => "plugins/departments/images/department.png", 
+       "IMG"       => "plugins/departments/images/department.png", "ABBR" => "dc");
+
     $types['country']            = array("ACL" => "country",      "ATTR" => "c",
-        "TITLE"     => _("Department"),
+        "TITLE"     => _("Country"),
         "IMG_FULL"  => "plugins/departments/images/country.png", 
         "IMG"       => "plugins/departments/images/country.png", "ABBR" => "c");
     $types['locality']           = array("ACL" => "locality",     "ATTR" => "l",
-        "TITLE"     => _("Department"),
+        "TITLE"     => _("Locality"),
         "IMG_FULL"  => "plugins/departments/images/locality.png", 
         "IMG"       => "plugins/departments/images/locality.png", "ABBR" => "l");
     $types['organizationalUnit'] = array("ACL" => "department",   "ATTR" => "ou",
@@ -217,15 +221,15 @@ class divListDepartment extends MultiSelectWindow
         "IMG_FULL"  => "images/lists/folder-full.png", 
         "IMG"       => "images/lists/folder.png", "ABBR" => "ou");
     $types['organization']       = array("ACL" => "organization", "ATTR" => "o",
-        "TITLE"     => _("Department"),
+        "TITLE"     => _("Organization"),
         "IMG_FULL"  => "plugins/departments/images/organization.png", 
         "IMG"       => "plugins/departments/images/organization.png", "ABBR" => "o");
     $types['Alias??']            = array("ACL" => "alias"     ,    "ATTR" => "alias?",
-        "TITLE"     => _("Department"),
+        "TITLE"     => _("Alias"),
         "IMG_FULL"  => "plugins/departments/images/department_alias.png", 
         "IMG"       => "plugins/departments/images/department_alias.png", "ABBR" => "alias");
     $types['Referal??']          = array("ACL" => "referal",       "ATTR" => "referal?",
-        "TITLE"     => _("Department"),
+        "TITLE"     => _("Referal"),
         "IMG_FULL"  => "plugins/departments/images/department_referal.png", 
         "IMG"       => "plugins/departments/images/department_referal.png", "ABBR" => "referal");