EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
ref
Yuri Kuznetsov7e4254ab42c3
diff --git a/application/Espo/Controllers/Integration.php b/application/Espo/Controllers/Integration.phpindex 3cc130f227..fae5947901 100644--- a/application/Espo/Controllers/Integration.php+++ b/application/Espo/Controllers/Integration.php@@ -29,31 +29,34 @@namespace Espo\Controllers;+use Espo\Core\Exceptions\NotFound;use Espo\Services\Integration as Service;-use Espo\Core\Exceptions\Forbidden;use Espo\Core\Api\Request;-use Espo\Entities\User;use stdClass;class Integration{- private $service;- private $user;-- public function __construct(Service $service, User $user)- {- $this->service = $service;- $this->user = $user;+ /**+ * @throws Forbidden+ */+ public function __construct(+ private Service $service,+ private User $user,+ ) {if (!$this->user->isAdmin()) {throw new Forbidden();}}+ /**+ * @throws Forbidden+ * @throws NotFound+ */public function getActionRead(Request $request): stdClass{/** @var string $id */@@ -64,6 +67,10 @@ class Integrationreturn $entity->getValueMap();}+ /**+ * @throws Forbidden+ * @throws NotFound+ */public function putActionUpdate(Request $request): stdClass{/** @var string $id */