From 773cf827a3fdbc87aed88f402bccb534a7ba8559 Mon Sep 17 00:00:00 2001 From: Marc Koch Date: Tue, 1 Apr 2025 18:53:32 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix=20bug=20on=20participant=20d?= =?UTF-8?q?eletion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mailinglistsync.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mailinglistsync.php b/mailinglistsync.php index 9850ef5..9f76eb8 100644 --- a/mailinglistsync.php +++ b/mailinglistsync.php @@ -225,8 +225,10 @@ function mailinglistsync_civicrm_post(string $op, string $objectName, int $objec ->first()['event_id']; $mailingList = new EventMailingList($eventId); - // Check permission to alter event mailing list - if ($mailingList->isEnabled() && !CRM_Core_Permission::check('manage_event_mailinglists')) { + // Check permission to alter event mailing list if it is not a deletion + if ($op !== 'delete' + && $mailingList->isEnabled() + && !CRM_Core_Permission::check('manage_event_mailinglists')) { CRM_Core_Session::setStatus( E::ts('You do not have permission to manage event mailing lists.'), E::ts('Permission Denied'),