From 9a1f91ead2312c11974b36071c5ef0b9e8bac5be Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Mon, 30 Jan 2017 08:40:01 -0500 Subject: [PATCH] Revert "(fix) properly honor "include in freebusy" (fixes #3354)" This reverts commit 42c2c66caa557b381944a8abb60bdd5b9dc036be. --- SoObjects/Appointments/SOGoAppointmentFolder.m | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.m b/SoObjects/Appointments/SOGoAppointmentFolder.m index 583764dc1..7d647f949 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -437,32 +437,26 @@ static Class iCalEventK = nil; // // If the user is the owner of the calendar, by default we include the freebusy information. // -// If the user is NOT the owner of the calendar but is subscribed, by default we exclude the freebusy information. +// If the user is NOT the owner of the calendar, by default we exclude the freebusy information. // // We must include the freebusy information of other users if we are actually looking at their freebusy information // but we aren't necessarily subscribed to their calendars. // - (BOOL) includeInFreeBusy { - NSString *userLogin, *subscriptionReference; NSNumber *excludeFromFreeBusy; + NSString *userLogin; + BOOL is_owner; - BOOL is_owner, is_subscription; - userLogin = [[context activeUser] login]; is_owner = [userLogin isEqualToString: self->owner]; - - // We check if we're subscribed. We must NOT use here [self isSubscribed] as it'll look - // at the owner's settings, and not the activeUser's settings. - subscriptionReference = [NSString stringWithFormat: @"%@:Calendar/%@", self->owner, [self nameInContainer]]; - is_subscription = [[[[[self->context activeUser] userSettings] objectForKey: @"Calendar"] objectForKey: @"SubscribedFolders"] containsObject: subscriptionReference]; // Check if the owner (not the active user) has excluded the calendar from her/his free busy data. excludeFromFreeBusy = [self folderPropertyValueInCategory: @"FreeBusyExclusions" forUser: [context activeUser]]; - if (is_subscription) + if ([self isSubscription]) { // If the user has not yet set an include/not include fb information let's EXCLUDE it. if (!excludeFromFreeBusy)