From 81774d36178334d02ef1054a0f0009468613a587 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 30 Jan 2008 11:02:14 +0000 Subject: [PATCH] Added a seperate ACL fot vacation start stop git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@8657 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/groups/acl_definition.inc | 4 ++- plugins/personal/mail/class_mailAccount.inc | 8 +++--- plugins/personal/mail/generic.tpl | 30 +++++++++++++++------ 3 files changed, 30 insertions(+), 12 deletions(-) diff --git a/plugins/admin/groups/acl_definition.inc b/plugins/admin/groups/acl_definition.inc index b1fffa398..6a5975cc4 100644 --- a/plugins/admin/groups/acl_definition.inc +++ b/plugins/admin/groups/acl_definition.inc @@ -254,7 +254,9 @@ $ACLD['mailAccount']= array( "gosaMailServer", "gosaSpamMailbox", "gosaSpamSortLevel", - "gosaVacationMessage", + "use_vacation" => _("Enable vacation message"), + "gosaVacationMessage" => _("Vacation message"), + "gosaVacationTimer" => _("Vacation start/stop"), "sieveManagement", "drop_own_mails", "mail", diff --git a/plugins/personal/mail/class_mailAccount.inc b/plugins/personal/mail/class_mailAccount.inc index 8484608df..fe0058d09 100644 --- a/plugins/personal/mail/class_mailAccount.inc +++ b/plugins/personal/mail/class_mailAccount.inc @@ -620,7 +620,9 @@ class mailAccount extends plugin $smarty->assign("$val"."ACL", chkacl($this->acl, "$val")); } - $smarty->assign("sieveManagementACL", chkacl($this->acl,"sieveManagement")); + $smarty->assign("use_vacationACL", chkacl($this->acl,"use_vacation")); + $smarty->assign("gosaVacationTimerACL", chkacl($this->acl,"gosaVacationTimer")); + $smarty->assign("sieveManagementACL", chkacl($this->acl,"sieveManagement")); if (preg_match('/V/', $this->gosaMailDeliveryMode)){ $smarty->assign('rangeEnabled', ""); @@ -810,7 +812,7 @@ class mailAccount extends plugin $tmp= ""; $Flags = array( "R" => array("ACL" => "gosaMailMaxSize", "POST" => "use_mailsize_limit"), - "V" => array("ACL" => "gosaVacationMessage","POST" => "use_vacation"), + "V" => array("ACL" => "use_vacation", "POST" => "use_vacation"), "C" => array("ACL" => "custom_sieve", "POST" => "own_script"), "I" => array("ACL" => "only_local", "POST" => "only_local")); @@ -860,7 +862,7 @@ class mailAccount extends plugin } $this->gosaMailDeliveryMode= $tmp; - if(chkacl($this->acl,"gosaVacationMessage") == "" && preg_match("/V/",$this->gosaMailDeliveryMode)){ + if(chkacl($this->acl,"gosaVacationTimer") == "" && preg_match("/V/",$this->gosaMailDeliveryMode)){ if(isset($_POST['gosaVacationStart'])){ $this->gosaVacationStart = $_POST['gosaVacationStart']; } diff --git a/plugins/personal/mail/generic.tpl b/plugins/personal/mail/generic.tpl index 76c4107f0..d19763f63 100644 --- a/plugins/personal/mail/generic.tpl +++ b/plugins/personal/mail/generic.tpl @@ -111,8 +111,22 @@ {t}No delivery to own mailbox{/t}
- {t}Activate vacation message{/t} + + {t}Activate vacation message{/t}
@@ -121,13 +135,13 @@ {t}from{/t}
- {html_options values=$days output=$days selected=$start_day} - {html_options options=$months selected=$start_month} - {html_options values=$years output=$years selected=$start_year} @@ -138,13 +152,13 @@ {t}till{/t} - {html_options values=$days output=$days selected=$end_day} - {html_options options=$months selected=$end_month} - {html_options values=$years output=$years selected=$end_year} -- 2.30.2