From 490a8f6ff4fe2ed06c3f75138a7bb6a1287df28f Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 21 Apr 2017 16:21:49 +0200 Subject: [PATCH] Do not show actions which user has no run permission --- mail/inc/class.mail_compose.inc.php | 6 ++++++ mail/inc/class.mail_ui.inc.php | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/mail/inc/class.mail_compose.inc.php b/mail/inc/class.mail_compose.inc.php index 40e1ba34fe..04562a11d0 100644 --- a/mail/inc/class.mail_compose.inc.php +++ b/mail/inc/class.mail_compose.inc.php @@ -264,6 +264,12 @@ class mail_compose } unset($actions['pgp']); } + // remove vfs actions if the user has no run access to filemanager + if (!$GLOBALS['egw_info']['user']['apps']['filemanager']) + { + unset($actions['save2vfs']); + unset($actions['selectFromVFSForCompose']); + } return $actions; } diff --git a/mail/inc/class.mail_ui.inc.php b/mail/inc/class.mail_ui.inc.php index c35e81e035..e1392f886f 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -1300,6 +1300,11 @@ class mail_ui { unset($actions['calendar']); } + // remove vfs actions if the user has no run access to filemanager + if (!$GLOBALS['egw_info']['user']['apps']['filemanager']) + { + unset($actions['save']['children']['save2filemanager']); + } return $actions; }