From 83ac300aa37dc88bfef24960b18ca90e67f75755 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Tue, 5 Oct 2021 20:31:24 +0300 Subject: [PATCH] fix logo upload --- application/Espo/Services/Attachment.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/application/Espo/Services/Attachment.php b/application/Espo/Services/Attachment.php index ebfa11e532..a26e9411e6 100644 --- a/application/Espo/Services/Attachment.php +++ b/application/Espo/Services/Attachment.php @@ -234,6 +234,10 @@ class Attachment extends Record throw new Error("Field type '{$fieldType}' is not allowed for {$role}."); } + if ($this->getUser()->isAdmin() && $relatedEntityType === 'Settings') { + return; + } + if ( !$this->getAcl()->checkScope($relatedEntityType, 'create') &&