From 47456c9ebd1fb0aa2c43bb70c934e7c7bb2d352b Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Wed, 13 Mar 2019 09:08:31 -0400 Subject: [PATCH] Allow super users to modify any event Fixes #4216 --- NEWS | 1 + SoObjects/Appointments/SOGoAppointmentObject.m | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index e3e321fb6..28549c3f5 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,7 @@ Bug fixes - [web] fixed wrong translation of custom calendar categories - [web] fixed wrong colors assigned to default calendar categories + - [core] allow super users to modify any event (#4216) 4.0.7 (2019-02-27) ------------------ diff --git a/SoObjects/Appointments/SOGoAppointmentObject.m b/SoObjects/Appointments/SOGoAppointmentObject.m index c08816287..12e0f3730 100644 --- a/SoObjects/Appointments/SOGoAppointmentObject.m +++ b/SoObjects/Appointments/SOGoAppointmentObject.m @@ -2417,7 +2417,7 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent roles = [[context activeUser] rolesForObject: organizerObject inContext: context]; - if (![roles containsObject: @"ComponentModifier"]) + if (![roles containsObject: @"ComponentModifier"] && ![[context activeUser] isSuperUser]) { return [NSException exceptionWithHTTPStatus: 409 reason: @"Not allowed to perform this action. Wrong SENT-BY being used regarding access rights on organizer's calendar."];