EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
Get folder list fix
Yurii0f9ebf26271d
diff --git a/application/Espo/Core/Mail/Account/PersonalAccount/Service.php b/application/Espo/Core/Mail/Account/PersonalAccount/Service.phpindex a915d9bd1f..5de3192ed6 100644--- a/application/Espo/Core/Mail/Account/PersonalAccount/Service.php+++ b/application/Espo/Core/Mail/Account/PersonalAccount/Service.php@@ -111,6 +111,13 @@ class Serviceif ($params->getId()) {$account = $this->accountFactory->create($params->getId());+ if (+ !$this->user->isAdmin() &&+ $account->getUser()->getId() !== $this->user->getId()+ ) {+ throw new Forbidden();+ }+$params = $params->withPassword($this->getPassword($params, $account))->withImapHandlerClassName($account->getImapHandlerClassName());