From e7627d11975b6c88d5155a5aa005697f0b2fb59a Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 8 Sep 2006 04:35:14 +0000 Subject: [PATCH] Added acls to mimetype Not tested yet git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4619 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../mimetypes/class_divListMimeTypes.inc | 1 - .../admin/mimetypes/class_mimetypeGeneric.inc | 2 - .../mimetypes/class_mimetypeManagement.inc | 4 +- plugins/admin/mimetypes/generic.tpl | 99 +++++++++++++------ 4 files changed, 71 insertions(+), 35 deletions(-) diff --git a/plugins/admin/mimetypes/class_divListMimeTypes.inc b/plugins/admin/mimetypes/class_divListMimeTypes.inc index da7850468..0914cf819 100755 --- a/plugins/admin/mimetypes/class_divListMimeTypes.inc +++ b/plugins/admin/mimetypes/class_divListMimeTypes.inc @@ -169,7 +169,6 @@ class divListMimeTypes extends MultiSelectWindow $ui = get_userinfo(); $acl = $ui->get_permissions("cn=dummy,ou=mimetypes,".$this->selectedBase,"mimetypes/mimetype"); - print_a($list); foreach($list as $key => $val){ /* Create action icons */ diff --git a/plugins/admin/mimetypes/class_mimetypeGeneric.inc b/plugins/admin/mimetypes/class_mimetypeGeneric.inc index f200bca26..8f0594aec 100644 --- a/plugins/admin/mimetypes/class_mimetypeGeneric.inc +++ b/plugins/admin/mimetypes/class_mimetypeGeneric.inc @@ -342,8 +342,6 @@ class mimetype extends plugin if(isset($_POST['MimeGeneric'])){ plugin::save_object(); - print_a($this); - /* Only save base if we are not in release mode */ if(!$this->isReleaseMimeType){ if(isset($_POST['base'])){ diff --git a/plugins/admin/mimetypes/class_mimetypeManagement.inc b/plugins/admin/mimetypes/class_mimetypeManagement.inc index c18cae801..87b34ccb7 100755 --- a/plugins/admin/mimetypes/class_mimetypeManagement.inc +++ b/plugins/admin/mimetypes/class_mimetypeManagement.inc @@ -165,7 +165,7 @@ class mimetypeManagement extends plugin $this->dn= "new"; /* Create new usertab object */ - $this->mimetabs= new mimetabs($this->config, $this->config->data['TABS']['MIMETABS'], $this->dn,"mimetypes/mimetype"); + $this->mimetabs= new mimetabs($this->config, $this->config->data['TABS']['MIMETABS'], $this->dn,"mimetypes"); $this->mimetabs->set_acl_base($this->DivListMimeTypes->selectedBase); } @@ -405,8 +405,6 @@ class mimetypeManagement extends plugin /* Get results and create index */ $res= get_list($Filter, "mimetypes", $use_base, array("cn","description","dn","objectClass"), $Flags); - echo $Filter; - print_a(array($res)); foreach ($res as $val){ $tmp[strtolower($val['cn'][0]).$val['cn'][0]]=$val; } diff --git a/plugins/admin/mimetypes/generic.tpl b/plugins/admin/mimetypes/generic.tpl index f1e13c763..e913e977b 100644 --- a/plugins/admin/mimetypes/generic.tpl +++ b/plugins/admin/mimetypes/generic.tpl @@ -1,7 +1,7 @@ @@ -13,7 +13,9 @@ {t}Mime type{/t}{$must} @@ -21,9 +23,11 @@ {t}Mime group{/t} @@ -31,22 +35,25 @@ {t}Description{/t} +{render acl=$baseACL} + +{/render} + +{render acl=$baseACL disable_picture='images/folder_gray.png'} + +{/render} +
-

 {t}Generic{/t}

+

[M] {t}Generic{/t}

- +{render acl=$gotoMimeGroupACL} + +{/render}
- {html_options output=$gotoMimeGroups values=$gotoMimeGroups selected=$gotoMimeGroup} +{/render}
- +{render acl=$descriptionACL} + +{/render}
- - {if $baseACL == "" && !$isReleaseMimeType} - - {else} - - {/if} -
@@ -57,13 +64,20 @@
- + {t}Mime icon{/t}  
- - +{render acl=$gotoMimeIconACL} + +{/render} +{render acl=$gotoMimeIconACL} + +{/render} @@ -76,21 +90,34 @@ -

 {t}Left click{/t}

+

{t}Left click{/t} {t}Left click{/t}

{t}File patterns{/t}{$must} - {$gotoMimeFilePatterns} - - +{render acl=$gotoMimeFilePatternACL} + {$gotoMimeFilePatterns} +{/render} + +{render acl=$gotoMimeFilePatternACL} + +{/render} +{render acl=$gotoMimeFilePatternACL} + +{/render} {t}Applications{/t} +{render acl=$gotoMimeApplicationACL} {$gotoMimeApplications} - - +{/render} +{render acl=$gotoMimeApplicationACL} + +{/render} +{render acl=$gotoMimeApplicationACL} + +{/render} @@ -100,7 +127,7 @@ -

 {t}Embedding{/t}

+

{t}Embedding{/t} {t}Embedding{/t}

@@ -109,18 +136,24 @@ @@ -129,9 +162,17 @@
+{render acl=$gotoMimeLeftClickActionACL} + {if $gotoMimeLeftClickAction_I} checked {/if}> +{/render} {t}Show file in embedded viewer{/t}
+{render acl=$gotoMimeLeftClickActionACL} + {if $gotoMimeLeftClickAction_E} checked {/if}> +{/render} {t}Show file in external viewer{/t}
+{render acl=$gotoMimeLeftClickActionACL} + {if $gotoMimeLeftClickAction_Q} checked {/if}> +{/render} {t}Ask whether to save to local disk{/t}
{t}Applications{/t} +{render acl=$gotoMimeEmbeddedApplicationACL} {$gotoMimeEmbeddedApplications} - - +{/render} +{render acl=$gotoMimeEmbeddedApplicationACL} + +{/render} +{render acl=$gotoMimeEmbeddedApplicationACL} + +{/render}
-- 2.30.2