From 84929629237da2519cfca7e87f77cf8a34971202 Mon Sep 17 00:00:00 2001 From: yuri Date: Tue, 18 Dec 2018 11:25:50 +0200 Subject: [PATCH] settings filter smtp info --- application/Espo/Services/Settings.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/application/Espo/Services/Settings.php b/application/Espo/Services/Settings.php index 886e63da2e..3e95dcc213 100644 --- a/application/Espo/Services/Settings.php +++ b/application/Espo/Services/Settings.php @@ -158,7 +158,13 @@ class Settings extends \Espo\Core\Services\Base { if ($this->getUser()->isSystem()) return; - if (!$this->getAcl()->checkScope('Email', 'create')) { + if ($this->getUser()->isAdmin()) return; + + if ( + !$this->getAcl()->checkScope('Email', 'create') + || + !$this->getConfig()->get('outboundEmailIsShared') + ) { unset($data->outboundEmailFromAddress); unset($data->outboundEmailFromName); unset($data->outboundEmailBccAddress);