Fix freebusy info not always returned

This commit is contained in:
Ludovic Marcotte
2014-12-23 10:24:16 -05:00
parent 255bcbe92f
commit 31cffdffd3
4 changed files with 23 additions and 8 deletions

1
NEWS
View File

@@ -3,6 +3,7 @@
Bug fixes
- fix contact description truncation on WP8 phones (#3028)
- fix freebusy information not always returned
Enhancements
- initial support for empty sync request/response for EAS

View File

@@ -492,6 +492,9 @@ static Class iCalEventK = nil;
//
// 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
{
NSNumber *excludeFromFreeBusy;
@@ -500,16 +503,29 @@ static Class iCalEventK = nil;
userLogin = [[context activeUser] login];
is_owner = [userLogin isEqualToString: [self ownerInContext: context]];
// Check if the owner (not the active user) has excluded the calendar from her/his free busy data.
excludeFromFreeBusy
= [self folderPropertyValueInCategory: @"FreeBusyExclusions"
forUser: [SOGoUser userWithLogin: userLogin]];
if (!excludeFromFreeBusy && !is_owner)
return NO;
if ([self isSubscription])
{
// If the user has not yet set an include/not include fb information...
if (!excludeFromFreeBusy)
return NO;
else
return ![excludeFromFreeBusy boolValue];
}
else if (is_owner)
{
if (!excludeFromFreeBusy)
return YES;
else
return ![excludeFromFreeBusy boolValue];
}
return ![excludeFromFreeBusy boolValue];
return YES;
}
- (void) setIncludeInFreeBusy: (BOOL) newInclude

View File

@@ -1,6 +1,6 @@
/* SOGoFolder.h - this file is part of SOGo
*
* Copyright (C) 2007-2013 Inverse inc.
* Copyright (C) 2007-2014 Inverse inc.
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@@ -1,8 +1,6 @@
/* SOGoFolder.m - this file is part of SOGo
*
* Copyright (C) 2007-2011 Inverse inc.
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
* Copyright (C) 2007-2014 Inverse inc.
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by