Merge branch 'fix'
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user