Monotone-Parent: eef38dc2fbafb16d2c16acc4dc79d0412e927b3b

Monotone-Revision: f93961e90221976ffc8c660ae642c8bbe0c84f61

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2011-11-30T14:49:07
maint-2.0.2
Wolfgang Sourdeau 2011-11-30 14:49:07 +00:00
parent 1da868bdd8
commit cd7d211b60
2 changed files with 39 additions and 3 deletions

View File

@ -1,5 +1,13 @@
2011-11-30 Wolfgang Sourdeau <wsourdeau@inverse.ca> 2011-11-30 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* Main/SOGo+DAV.m (-davPrincipalURL): new DAV getter.
(-davPrincipalSearchPropertySet): added "calendar-user-type", even
though it's a lie.
(-davComplianceClassesInContext:): declare
"calendar-query-extended", "extended-mkcol",
"calendarserver-principal-property-search" as additional classes,
even though it's a lie.
* SoObjects/Appointments/SOGoUserFolder+Appointments.m * SoObjects/Appointments/SOGoUserFolder+Appointments.m
(-davCalendarUserAddressSet): make sure each email address is (-davCalendarUserAddressSet): make sure each email address is
reported only once, we also return the user principal in the list reported only once, we also return the user principal in the list

View File

@ -48,6 +48,26 @@
@implementation SOGo (SOGoWebDAVExtensions) @implementation SOGo (SOGoWebDAVExtensions)
- (NSArray *) davPrincipalURL
{
NSArray *principalURL;
NSString *classes;
WOContext *context;
context = [self context];
if ([[context request] isICal4])
{
classes = [[self davComplianceClassesInContext: context]
componentsJoinedByString: @", "];
[[context response] setHeader: classes forKey: @"DAV"];
}
principalURL = [NSArray arrayWithObjects: @"href", @"DAV:", @"D",
[self davURLAsString], nil];
return [NSArray arrayWithObject: principalURL];
}
- (WOResponse *) davPrincipalSearchPropertySet: (WOContext *) localContext - (WOResponse *) davPrincipalSearchPropertySet: (WOContext *) localContext
{ {
static NSDictionary *davResponse = nil; static NSDictionary *davResponse = nil;
@ -62,6 +82,7 @@
properties = [NSArray arrayWithObjects: properties = [NSArray arrayWithObjects:
@"calendar-user-type", @"calendar-user-type",
@"calendar-user-address-set", @"calendar-user-address-set",
@"calendar-user-type",
@"displayname", @"displayname",
@"first-name", @"first-name",
@"last-name", @"last-name",
@ -72,6 +93,7 @@
namespaces = [NSArray arrayWithObjects: namespaces = [NSArray arrayWithObjects:
XMLNS_CALDAV, XMLNS_CALDAV,
XMLNS_CALDAV, XMLNS_CALDAV,
XMLNS_CALDAV,
XMLNS_WEBDAV, XMLNS_WEBDAV,
XMLNS_CalendarServerOrg, XMLNS_CalendarServerOrg,
XMLNS_CalendarServerOrg, XMLNS_CalendarServerOrg,
@ -549,9 +571,15 @@
{ {
newClasses newClasses
= [[super davComplianceClassesInContext: localContext] mutableCopy]; = [[super davComplianceClassesInContext: localContext] mutableCopy];
selfClasses = [NSArray arrayWithObjects: @"access-control", @"addressbook", selfClasses = [NSArray arrayWithObjects: @"access-control",
@"calendar-access", @"calendar-auto-schedule", @"addressbook", @"calendar-access",
@"calendar-schedule", @"calendar-proxy", nil]; @"calendar-schedule", @"calendar-auto-schedule",
@"calendar-proxy",
@"calendar-query-extended",
@"extended-mkcol",
@"calendarserver-principal-property-search",
nil];
[newClasses addObjectsFromArray: selfClasses]; [newClasses addObjectsFromArray: selfClasses];
} }