Skip to content

EspoCRM – Open Source CRM Application

Email template check entity

Yurii0737fb82e3b5
diff --git a/application/Espo/Tools/EmailTemplate/Processor.php b/application/Espo/Tools/EmailTemplate/Processor.php
index 5524beb24e..e61ba90a28 100644
--- a/application/Espo/Tools/EmailTemplate/Processor.php
+++ b/application/Espo/Tools/EmailTemplate/Processor.php
@@ -370,6 +370,14 @@ class Processor
User::ENTITY_TYPE,
]
);
+
+ if (
+ $foundByAddressEntity &&
+ $params->applyAcl() &&
+ !$this->aclManager->checkEntityRead($this->user, $foundByAddressEntity)
+ ) {
+ $foundByAddressEntity = null;
+ }
}
if ($foundByAddressEntity) {