From a5becb8154c3274b79e4baeb3ecad095f5e799b2 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 7 Nov 2008 10:19:30 +0000 Subject: [PATCH] Updated ACLs for mimetypes git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12963 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../goto/admin/mimetypes/class_divListMimeTypes.inc | 4 ++-- .../goto/admin/mimetypes/class_mimetypeManagement.inc | 7 +++++-- gosa-plugins/goto/admin/mimetypes/main.inc | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/gosa-plugins/goto/admin/mimetypes/class_divListMimeTypes.inc b/gosa-plugins/goto/admin/mimetypes/class_divListMimeTypes.inc index 8fe4e83f2..6cc6e6df8 100644 --- a/gosa-plugins/goto/admin/mimetypes/class_divListMimeTypes.inc +++ b/gosa-plugins/goto/admin/mimetypes/class_divListMimeTypes.inc @@ -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 */ diff --git a/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc b/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc index 61285cda7..d41c7b958 100644 --- a/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc +++ b/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc @@ -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); } diff --git a/gosa-plugins/goto/admin/mimetypes/main.inc b/gosa-plugins/goto/admin/mimetypes/main.inc index 79d8da876..0f398dee5 100644 --- a/gosa-plugins/goto/admin/mimetypes/main.inc +++ b/gosa-plugins/goto/admin/mimetypes/main.inc @@ -40,7 +40,7 @@ if ($remove_lock){ if (session::is_set('objectinfo')){ $display= print_header(get_template_path($MimeTypeManagement->plIcon), _("Mimetype management"), "\"\" ".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? */ -- 2.30.2