From 35ea86557ccde403ce44898a8a4ff96333e135d7 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Mon, 22 Oct 2018 12:08:46 -0400 Subject: [PATCH] Fix time conflict validation when not owner --- NEWS | 6 ++++++ SoObjects/Appointments/SOGoAppointmentObject.m | 11 ++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index e563b6ceb..ea51d620a 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,9 @@ +4.X.Y (2018-MM-DD) +------------------ + +Bug fixes + - [web] fixed time conflict validation when not the owner + 4.0.3 (2018-10-17) ------------------ diff --git a/SoObjects/Appointments/SOGoAppointmentObject.m b/SoObjects/Appointments/SOGoAppointmentObject.m index b30c63483..2fedc7c56 100644 --- a/SoObjects/Appointments/SOGoAppointmentObject.m +++ b/SoObjects/Appointments/SOGoAppointmentObject.m @@ -718,6 +718,7 @@ } // Find the attendee associated to the current UID + currentAttendee = nil; for (i = 0; i < [theAttendees count]; i++) { currentAttendee = [theAttendees objectAtIndex: i]; @@ -783,6 +784,7 @@ NSMutableDictionary *info; NSMutableArray *conflicts; NSString *formattedEnd; + SOGoUser *ownerUser; id o; info = [NSMutableDictionary dictionary]; @@ -792,10 +794,17 @@ { if ([currentAttendee cn]) [info setObject: [currentAttendee cn] forKey: @"attendee_name"]; - if ([currentAttendee rfc822Email]) [info setObject: [currentAttendee rfc822Email] forKey: @"attendee_email"]; } + else if ([owner isEqualToString: currentUID]) + { + ownerUser = [SOGoUser userWithLogin: owner]; + if ([ownerUser cn]) + [info setObject: [ownerUser cn] forKey: @"attendee_name"]; + if ([ownerUser systemEmail]) + [info setObject: [ownerUser systemEmail] forKey: @"attendee_email"]; + } for (i = 0; i < [fbInfo count]; i++) {