diff --git a/application/Espo/Classes/FieldProcessing/Email/IcsDataLoader.php b/application/Espo/Classes/FieldProcessing/Email/IcsDataLoader.php index 68a399c875..d06f4761d3 100644 --- a/application/Espo/Classes/FieldProcessing/Email/IcsDataLoader.php +++ b/application/Espo/Classes/FieldProcessing/Email/IcsDataLoader.php @@ -44,7 +44,6 @@ use Espo\Core\{ }; use ICal\ICal; -use ICal\Event; use Throwable; use stdClass; @@ -85,7 +84,7 @@ class IcsDataLoader implements Loader $ical->initString($icsContents); - /* @var $event Event */ + /* @var \ICal\Event|null $event */ $event = $ical->events()[0] ?? null; if ($event === null) { diff --git a/application/Espo/Core/Mail/Event/EventFactory.php b/application/Espo/Core/Mail/Event/EventFactory.php index 8a972a0cbd..1028c69a1f 100644 --- a/application/Espo/Core/Mail/Event/EventFactory.php +++ b/application/Espo/Core/Mail/Event/EventFactory.php @@ -29,7 +29,6 @@ namespace Espo\Core\Mail\Event; -use ICal\Event as U01jmg3Event; use ICal\ICal as U01jmg3ICal; use RuntimeException; @@ -38,7 +37,7 @@ class EventFactory { public static function createFromU01jmg3Ical(U01jmg3ICal $ical): Event { - /* @var $event U01jmg3Event */ + /* @var \ICal\Event|null $event */ $event = $ical->events()[0] ?? null; if (!$event) { diff --git a/application/Espo/Core/MassAction/Actions/MassConvertCurrency.php b/application/Espo/Core/MassAction/Actions/MassConvertCurrency.php index 5ff3cb78c8..f2f1877c7b 100644 --- a/application/Espo/Core/MassAction/Actions/MassConvertCurrency.php +++ b/application/Espo/Core/MassAction/Actions/MassConvertCurrency.php @@ -31,6 +31,8 @@ namespace Espo\Core\MassAction\Actions; use Espo\Entities\User; +use Espo\Core\Acl\Table; + use Espo\Core\{ Exceptions\Forbidden, Exceptions\BadRequest, @@ -93,11 +95,11 @@ class MassConvertCurrency implements MassAction { $entityType = $params->getEntityType(); - if (!$this->acl->check($entityType, 'delete')) { - throw new Forbidden("No delete access for '{$entityType}'."); + if (!$this->acl->checkScope($entityType, Table::ACTION_EDIT)) { + throw new Forbidden("No edit access for '{$entityType}'."); } - if ($this->acl->get('massUpdatePermission') !== 'yes') { + if ($this->acl->get('massUpdatePermission') !== Table::LEVEL_YES) { throw new Forbidden("No mass-update permission."); } @@ -142,7 +144,7 @@ class MassConvertCurrency implements MassAction $count = 0; foreach ($collection as $entity) { - if (!$this->acl->checkEntity($entity, 'edit')) { + if (!$this->acl->checkEntity($entity, Table::ACTION_EDIT)) { continue; }