Fix time conflict validation when not owner

pull/245/head
Francis Lachapelle 2018-10-22 12:08:46 -04:00
parent 59c3bdc242
commit 35ea86557c
2 changed files with 16 additions and 1 deletions

6
NEWS
View File

@ -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) 4.0.3 (2018-10-17)
------------------ ------------------

View File

@ -718,6 +718,7 @@
} }
// Find the attendee associated to the current UID // Find the attendee associated to the current UID
currentAttendee = nil;
for (i = 0; i < [theAttendees count]; i++) for (i = 0; i < [theAttendees count]; i++)
{ {
currentAttendee = [theAttendees objectAtIndex: i]; currentAttendee = [theAttendees objectAtIndex: i];
@ -783,6 +784,7 @@
NSMutableDictionary *info; NSMutableDictionary *info;
NSMutableArray *conflicts; NSMutableArray *conflicts;
NSString *formattedEnd; NSString *formattedEnd;
SOGoUser *ownerUser;
id o; id o;
info = [NSMutableDictionary dictionary]; info = [NSMutableDictionary dictionary];
@ -792,10 +794,17 @@
{ {
if ([currentAttendee cn]) if ([currentAttendee cn])
[info setObject: [currentAttendee cn] forKey: @"attendee_name"]; [info setObject: [currentAttendee cn] forKey: @"attendee_name"];
if ([currentAttendee rfc822Email]) if ([currentAttendee rfc822Email])
[info setObject: [currentAttendee rfc822Email] forKey: @"attendee_email"]; [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++) for (i = 0; i < [fbInfo count]; i++)
{ {