Code

Updated ACLs for mimetypes
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 7 Nov 2008 10:19:30 +0000 (10:19 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 7 Nov 2008 10:19:30 +0000 (10:19 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12963 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/mimetypes/class_divListMimeTypes.inc
gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc
gosa-plugins/goto/admin/mimetypes/main.inc

index 8fe4e83f2d916f663be33ae78c94ac5107ec739b..6cc6e6df85d1227368a25b6ded23c384db83b5fd 100644 (file)
@@ -98,8 +98,8 @@ class divListMimeTypes extends MultiSelectWindow
 
     /* Get acls */
     $ui       = get_userinfo();
-    $acl      = $ui->get_permissions($this->parent->mime_base,"mimetypes/mimetype");
-    $acl_all  = $ui->has_complete_category_acls($this->parent->mime_base,"mimetypes") ;
+    $acl      = $ui->get_permissions($this->parent->acl_base,"mimetypes/mimetype");
+    $acl_all  = $ui->has_complete_category_acls($this->parent->acl_base,"mimetypes") ;
 
 
     /* If this is true we add an additional seperator. Just look a few lines below */  
index 61285cda798367627f789519b0e12d9cf1228737..d41c7b95879bf22ab114c41c74d937dbe16dbb77 100644 (file)
@@ -34,6 +34,7 @@ class mimetypeManagement extends plugin
   var $start_pasting_copied_objects   = FALSE;
   var $enableReleaseManagement        = false;
 
+  var $acl_base     = "";
   var $mime_base    = "";
   var $mime_release = "";
 
@@ -76,6 +77,7 @@ class mimetypeManagement extends plugin
     /* Set default release */
     if(!$this->IsReleaseManagementActivated()){
       $this->mime_base = get_ou("mimetypeRDN").$this->config->current['BASE'];
+      $this->acl_base      = $this->config->current['BASE'];
       if(!session::is_set("mime_filter")){
 
         /* Set intial release */
@@ -89,6 +91,7 @@ class mimetypeManagement extends plugin
       $this->mime_base = $mime_filter['mime_base'];
     }else{
       $this->mime_base = get_ou("mimetypeRDN").$this->config->current['BASE'];
+      $this->acl_base = &$this->DivListMimeTypes->selectedBase;
 
       /* Set intial release */
       $rel = $config->search("faiManagement","DEFAULTFAIRELEASE",array("menu"));
@@ -234,7 +237,7 @@ class mimetypeManagement extends plugin
 
     /* New mime type? */
     $ui = get_userinfo();
-    $acl = $ui->get_permissions($this->mime_base,"mimetypes/mimetype");
+    $acl = $ui->get_permissions($this->acl_base,"mimetypes/mimetype");
     if (($s_action=="new") && preg_match("/c/",$acl)){
 
       /* By default we set 'dn' to 'new', all relevant plugins will
@@ -244,7 +247,7 @@ class mimetypeManagement extends plugin
       /* Create new usertab object */
       $this->mimetabs= new mimetabs($this->config, $this->config->data['TABS']['MIMETABS'], $this->dn,"mimetypes");
       $this->mimetabs->parent = &$this;
-      $this->mimetabs->set_acl_base($this->mime_base);
+      $this->mimetabs->set_acl_base($this->acl_base);
     }   
 
 
index 79d8da876e8769f4fa1736ee475c4563e2c4e83c..0f398dee5e381c644196203c223eb222151fe68c 100644 (file)
@@ -40,7 +40,7 @@ if ($remove_lock){
   if (session::is_set('objectinfo')){
     $display= print_header(get_template_path($MimeTypeManagement->plIcon), _("Mimetype management"), "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lists/locked.png')."\"> ".LDAP::fix(session::get('objectinfo')));
   } else {
-    $display= print_header(get_template_path('images/mimetypes.png'), _("Mimetype management"));
+    $display= print_header(get_template_path($MimeTypeManagement->plIcon), _("Mimetype management"));
   }
 
   /* Reset requested? */