From d23723244d9b27cd686ead5558c3f6769334aac0 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Mon, 30 Jun 2014 12:03:09 +0000 Subject: [PATCH] Disable "Set this as default" option for vacation notice if the user is not an admin user --- mail/inc/class.mail_sieve.inc.php | 5 +++++ mail/templates/default/sieve.vacation.xet | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/mail/inc/class.mail_sieve.inc.php b/mail/inc/class.mail_sieve.inc.php index 1fa9c4d6b2..0dc7f54d51 100644 --- a/mail/inc/class.mail_sieve.inc.php +++ b/mail/inc/class.mail_sieve.inc.php @@ -659,6 +659,11 @@ class mail_sieve { $sel_options['status'] += $ByDate; } + if (!isset($GLOBALS['egw_info']['user']['apps']['admin'])) + { + $content['is_not_admin_user'] = true; + $readonlys['set_as_default'] = true; + } $content['msg'] = $msg; } else diff --git a/mail/templates/default/sieve.vacation.xet b/mail/templates/default/sieve.vacation.xet index 5565b01b3b..d86e59b167 100644 --- a/mail/templates/default/sieve.vacation.xet +++ b/mail/templates/default/sieve.vacation.xet @@ -50,7 +50,7 @@ - +