Monotone-Parent: 950ea2f4a5916f47123e12564b35c975f97e4c78
Monotone-Revision: a4f965425609368d1347526114e039b4c8f07962 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-01-20T23:09:35 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
cb288eb502
commit
c5bc543e8d
15
ChangeLog
15
ChangeLog
|
@ -1,5 +1,20 @@
|
||||||
2010-01-20 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
2010-01-20 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
|
* SoObjects/Appointments/SOGoAppointmentInboxFolder.m
|
||||||
|
(-davCalendarFreeBusySet): only advertise the collections owner by
|
||||||
|
the inbox's owner.
|
||||||
|
(-davScheduleDefaultCalendarURL): new caldav accessor.
|
||||||
|
|
||||||
|
* SoObjects/Appointments/SOGoAppointmentFolders.m
|
||||||
|
(-toManyRelationShipKeys): unconditionnally display the inbox
|
||||||
|
collection.
|
||||||
|
(-lookupName:inContext:acquire:): accepts "inbox" even when the
|
||||||
|
active user is not the owner.
|
||||||
|
|
||||||
|
* SoObjects/Appointments/SOGoAppointmentFolder.m
|
||||||
|
(-davResourceType): unconditionnally advertise "personal" as
|
||||||
|
schedule-outbox.
|
||||||
|
|
||||||
* UI/WebServerResources/scriptaculous.js: modified to use
|
* UI/WebServerResources/scriptaculous.js: modified to use
|
||||||
ResourcesURL as base loading URL.
|
ResourcesURL as base loading URL.
|
||||||
|
|
||||||
|
|
|
@ -6613,15 +6613,16 @@ Index: sope-appserver/NGObjWeb/DAVPropMap.plist
|
||||||
===================================================================
|
===================================================================
|
||||||
--- sope-appserver/NGObjWeb/DAVPropMap.plist (revision 1664)
|
--- sope-appserver/NGObjWeb/DAVPropMap.plist (revision 1664)
|
||||||
+++ sope-appserver/NGObjWeb/DAVPropMap.plist (working copy)
|
+++ sope-appserver/NGObjWeb/DAVPropMap.plist (working copy)
|
||||||
@@ -157,6 +157,7 @@
|
@@ -157,6 +157,8 @@
|
||||||
"{urn:ietf:params:xml:ns:caldav}supported-calendar-data" =
|
"{urn:ietf:params:xml:ns:caldav}supported-calendar-data" =
|
||||||
davSupportedCalendarDataTypes;
|
davSupportedCalendarDataTypes;
|
||||||
"{urn:ietf:params:xml:ns:caldav}calendar-description" = davDescription;
|
"{urn:ietf:params:xml:ns:caldav}calendar-description" = davDescription;
|
||||||
+ "{urn:ietf:params:xml:ns:caldav}calendar-timezone" = davCalendarTimeZone;
|
+ "{urn:ietf:params:xml:ns:caldav}calendar-timezone" = davCalendarTimeZone;
|
||||||
|
+ "{urn:ietf:params:xml:ns:caldav}schedule-default-calendar-URL" = davScheduleDefaultCalendarURL;
|
||||||
|
|
||||||
/* CardDAV */
|
/* CardDAV */
|
||||||
"{urn:ietf:params:xml:ns:carddav}addressbook-home-set" = davAddressbookHomeSet;
|
"{urn:ietf:params:xml:ns:carddav}addressbook-home-set" = davAddressbookHomeSet;
|
||||||
@@ -168,6 +169,8 @@
|
@@ -168,6 +170,8 @@
|
||||||
"{http://calendarserver.org/ns/}dropbox-home-URL" = davDropboxHomeURL;
|
"{http://calendarserver.org/ns/}dropbox-home-URL" = davDropboxHomeURL;
|
||||||
"{http://calendarserver.org/ns/}notifications-URL" = davNotificationsURL;
|
"{http://calendarserver.org/ns/}notifications-URL" = davNotificationsURL;
|
||||||
"{http://calendarserver.org/ns/}getctag" = davCollectionTag;
|
"{http://calendarserver.org/ns/}getctag" = davCollectionTag;
|
||||||
|
@ -7338,6 +7339,15 @@ Index: sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpTransaction.m
|
||||||
hasConnectionHeader = YES;
|
hasConnectionHeader = YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -789,7 +798,7 @@
|
||||||
|
NSLog(@" END: %@", fieldName);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
-
|
||||||
|
+
|
||||||
|
#if HEAVY_DEBUG
|
||||||
|
NSLog(@" HEADER:\n%@", header);
|
||||||
|
NSLog(@" OUT: %@", out);
|
||||||
Index: sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpAdaptor.m
|
Index: sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpAdaptor.m
|
||||||
===================================================================
|
===================================================================
|
||||||
--- sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpAdaptor.m (revision 1664)
|
--- sope-appserver/NGObjWeb/WOHttpAdaptor/WOHttpAdaptor.m (revision 1664)
|
||||||
|
|
|
@ -2308,7 +2308,6 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
|
||||||
{
|
{
|
||||||
NSMutableArray *colType;
|
NSMutableArray *colType;
|
||||||
NSArray *gdRT, *gdVEventCol, *gdVTodoCol;
|
NSArray *gdRT, *gdVEventCol, *gdVTodoCol;
|
||||||
NSString *login;
|
|
||||||
WORequest *request;
|
WORequest *request;
|
||||||
|
|
||||||
colType = [NSMutableArray arrayWithCapacity: 10];
|
colType = [NSMutableArray arrayWithCapacity: 10];
|
||||||
|
@ -2329,17 +2328,9 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
|
||||||
XMLNS_GROUPDAV, nil];
|
XMLNS_GROUPDAV, nil];
|
||||||
[colType addObject: gdVTodoCol];
|
[colType addObject: gdVTodoCol];
|
||||||
if ([nameInContainer isEqualToString: @"personal"])
|
if ([nameInContainer isEqualToString: @"personal"])
|
||||||
{
|
|
||||||
login = [[context activeUser] login];
|
|
||||||
if ([login isEqualToString: [self ownerInContext: self]])
|
|
||||||
{
|
|
||||||
// [colType addObject: [NSArray arrayWithObjects: @"schedule-inbox",
|
|
||||||
// XMLNS_CALDAV, nil]];
|
|
||||||
[colType addObject: [NSArray arrayWithObjects: @"schedule-outbox",
|
[colType addObject: [NSArray arrayWithObjects: @"schedule-outbox",
|
||||||
XMLNS_CALDAV, nil]];
|
XMLNS_CALDAV, nil]];
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return colType;
|
return colType;
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,9 +88,9 @@
|
||||||
currentUser = [context activeUser];
|
currentUser = [context activeUser];
|
||||||
login = [currentUser login];
|
login = [currentUser login];
|
||||||
keys = [NSMutableArray array];
|
keys = [NSMutableArray array];
|
||||||
|
[keys addObject: @"inbox"];
|
||||||
if ([owner isEqualToString: login])
|
if ([owner isEqualToString: login])
|
||||||
{
|
{
|
||||||
[keys addObject: @"inbox"];
|
|
||||||
sortedSubFolders = [[self subFolders] objectEnumerator];
|
sortedSubFolders = [[self subFolders] objectEnumerator];
|
||||||
while ((currentFolder = [sortedSubFolders nextObject]))
|
while ((currentFolder = [sortedSubFolders nextObject]))
|
||||||
{
|
{
|
||||||
|
@ -120,17 +120,10 @@
|
||||||
acquire: (BOOL) acquire
|
acquire: (BOOL) acquire
|
||||||
{
|
{
|
||||||
id obj;
|
id obj;
|
||||||
NSString *login;
|
|
||||||
|
|
||||||
if ([name isEqualToString: @"inbox"])
|
if ([name isEqualToString: @"inbox"])
|
||||||
{
|
|
||||||
login = [[context activeUser] login];
|
|
||||||
if ([owner isEqualToString: login])
|
|
||||||
obj = [SOGoAppointmentInboxFolder objectWithName: name
|
obj = [SOGoAppointmentInboxFolder objectWithName: name
|
||||||
inContainer: self];
|
inContainer: self];
|
||||||
else
|
|
||||||
obj = nil;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
obj = [super lookupName: name inContext: lookupContext acquire: NO];
|
obj = [super lookupName: name inContext: lookupContext acquire: NO];
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
#import <NGObjWeb/WOContext+SoObjects.h>
|
#import <NGObjWeb/WOContext+SoObjects.h>
|
||||||
|
|
||||||
#import <SOGo/NSObject+DAV.h>
|
#import <SOGo/NSObject+DAV.h>
|
||||||
|
#import <SOGo/SOGoPermissions.h>
|
||||||
#import <SOGo/SOGoUser.h>
|
#import <SOGo/SOGoUser.h>
|
||||||
#import <SOGo/SOGoWebDAVValue.h>
|
#import <SOGo/SOGoWebDAVValue.h>
|
||||||
|
|
||||||
|
@ -43,17 +44,9 @@
|
||||||
|
|
||||||
- (NSArray *) davResourceType
|
- (NSArray *) davResourceType
|
||||||
{
|
{
|
||||||
NSMutableArray *colType;
|
return [NSArray arrayWithObjects: @"collection",
|
||||||
NSString *login;
|
[NSArray arrayWithObjects: @"schedule-inbox", XMLNS_CALDAV, nil],
|
||||||
|
nil];
|
||||||
colType = [NSMutableArray arrayWithCapacity: 10];
|
|
||||||
[colType addObject: @"collection"];
|
|
||||||
login = [[context activeUser] login];
|
|
||||||
if ([login isEqualToString: [self ownerInContext: self]])
|
|
||||||
[colType addObject: [NSArray arrayWithObjects: @"schedule-inbox",
|
|
||||||
XMLNS_CALDAV, nil]];
|
|
||||||
|
|
||||||
return colType;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (SOGoWebDAVValue *) davCalendarFreeBusySet
|
- (SOGoWebDAVValue *) davCalendarFreeBusySet
|
||||||
|
@ -66,6 +59,7 @@
|
||||||
response = [NSMutableArray array];
|
response = [NSMutableArray array];
|
||||||
subFolders = [[container subFolders] objectEnumerator];
|
subFolders = [[container subFolders] objectEnumerator];
|
||||||
while ((currentFolder = [subFolders nextObject]))
|
while ((currentFolder = [subFolders nextObject]))
|
||||||
|
if ([owner isEqualToString: [currentFolder ownerInContext: context]])
|
||||||
[response
|
[response
|
||||||
addObject: davElementWithContent (@"href", XMLNS_WEBDAV,
|
addObject: davElementWithContent (@"href", XMLNS_WEBDAV,
|
||||||
[currentFolder davURLAsString])];
|
[currentFolder davURLAsString])];
|
||||||
|
@ -81,4 +75,37 @@
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSArray *) davScheduleDefaultCalendarURL
|
||||||
|
{
|
||||||
|
NSArray *response;
|
||||||
|
NSString *personalURL;
|
||||||
|
|
||||||
|
personalURL = [NSString stringWithFormat: @"%@personal/",
|
||||||
|
[container davURLAsString]];
|
||||||
|
response = [NSArray arrayWithObjects: @"href", XMLNS_WEBDAV, @"D",
|
||||||
|
personalURL, nil];
|
||||||
|
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSArray *) aclsForUser: (NSString *) userID
|
||||||
|
{
|
||||||
|
NSString *login;
|
||||||
|
NSArray *acls;
|
||||||
|
|
||||||
|
acls = nil;
|
||||||
|
|
||||||
|
login = [[context activeUser] login];
|
||||||
|
if (![login isEqualToString: owner])
|
||||||
|
{
|
||||||
|
if ([container hasProxyCalendarsWithWriteAccess: YES
|
||||||
|
forUserWithLogin: login]
|
||||||
|
|| [container hasProxyCalendarsWithWriteAccess: NO
|
||||||
|
forUserWithLogin: login])
|
||||||
|
acls = [NSArray arrayWithObject: SOGoRole_AuthorizedSubscriber];
|
||||||
|
}
|
||||||
|
|
||||||
|
return acls;
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
emails = [[ownerUser allEmails] objectEnumerator];
|
emails = [[ownerUser allEmails] objectEnumerator];
|
||||||
while ((currentEmail = [emails nextObject]))
|
while ((currentEmail = [emails nextObject]))
|
||||||
{
|
{
|
||||||
tag = [NSArray arrayWithObjects: @"href", @"DAV:", @"D",
|
tag = [NSArray arrayWithObjects: @"href", XMLNS_WEBDAV, @"D",
|
||||||
[NSString stringWithFormat: @"mailto:%@", currentEmail],
|
[NSString stringWithFormat: @"mailto:%@", currentEmail],
|
||||||
nil];
|
nil];
|
||||||
[addresses addObject: tag];
|
[addresses addObject: tag];
|
||||||
|
@ -94,7 +94,7 @@
|
||||||
SOGoAppointmentFolders *parent;
|
SOGoAppointmentFolders *parent;
|
||||||
|
|
||||||
parent = [self privateCalendars: @"Calendar" inContext: context];
|
parent = [self privateCalendars: @"Calendar" inContext: context];
|
||||||
tag = [NSArray arrayWithObjects: @"href", @"DAV:", @"D",
|
tag = [NSArray arrayWithObjects: @"href", XMLNS_WEBDAV, @"D",
|
||||||
[parent davURLAsString], nil];
|
[parent davURLAsString], nil];
|
||||||
|
|
||||||
return [NSArray arrayWithObject: tag];
|
return [NSArray arrayWithObject: tag];
|
||||||
|
@ -104,24 +104,14 @@
|
||||||
{
|
{
|
||||||
SOGoAppointmentFolders *parent;
|
SOGoAppointmentFolders *parent;
|
||||||
NSArray *tag, *response;
|
NSArray *tag, *response;
|
||||||
NSString *parentURL, *login;
|
NSString *parentURL;
|
||||||
|
|
||||||
login = [[context activeUser] login];
|
|
||||||
if ([login isEqualToString: owner])
|
|
||||||
{
|
|
||||||
parent = [self privateCalendars: @"Calendar" inContext: context];
|
parent = [self privateCalendars: @"Calendar" inContext: context];
|
||||||
parentURL = [parent davURLAsString];
|
parentURL = [parent davURLAsString];
|
||||||
|
tag = [NSArray arrayWithObjects: @"href", XMLNS_WEBDAV, @"D",
|
||||||
if ([parentURL hasSuffix: @"/"])
|
[NSString stringWithFormat: @"%@%@/", parentURL, name],
|
||||||
parentURL = [parentURL substringToIndex: [parentURL length]-1];
|
|
||||||
|
|
||||||
tag = [NSArray arrayWithObjects: @"href", @"DAV:", @"D",
|
|
||||||
[NSString stringWithFormat: @"%@/%@/", parentURL, name],
|
|
||||||
nil];
|
nil];
|
||||||
response = [NSArray arrayWithObject: tag];
|
response = [NSArray arrayWithObject: tag];
|
||||||
}
|
|
||||||
else
|
|
||||||
response = nil;
|
|
||||||
|
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
@ -193,7 +183,7 @@
|
||||||
for (count = 0; count < max; count++)
|
for (count = 0; count < max; count++)
|
||||||
{
|
{
|
||||||
proxiedUser = [proxiedUsers objectAtIndex: count];
|
proxiedUser = [proxiedUsers objectAtIndex: count];
|
||||||
tag = [NSArray arrayWithObjects: @"href", @"DAV:", @"D",
|
tag = [NSArray arrayWithObjects: @"href", XMLNS_WEBDAV, @"D",
|
||||||
[NSString stringWithFormat: @"/%@/dav/%@/%@/",
|
[NSString stringWithFormat: @"/%@/dav/%@/%@/",
|
||||||
appName, proxiedUser, groupId],
|
appName, proxiedUser, groupId],
|
||||||
nil];
|
nil];
|
||||||
|
@ -233,7 +223,7 @@
|
||||||
for (count = 0; count < max; count++)
|
for (count = 0; count < max; count++)
|
||||||
{
|
{
|
||||||
proxiedUser = [proxiedUsers objectAtIndex: count];
|
proxiedUser = [proxiedUsers objectAtIndex: count];
|
||||||
tag = [NSArray arrayWithObjects: @"href", @"DAV:", @"D",
|
tag = [NSArray arrayWithObjects: @"href", XMLNS_WEBDAV, @"D",
|
||||||
[NSString stringWithFormat: @"/%@/dav/%@/",
|
[NSString stringWithFormat: @"/%@/dav/%@/",
|
||||||
appName, proxiedUser],
|
appName, proxiedUser],
|
||||||
nil];
|
nil];
|
||||||
|
|
|
@ -51,10 +51,10 @@
|
||||||
};
|
};
|
||||||
SOGoAppointmentInboxFolder = {
|
SOGoAppointmentInboxFolder = {
|
||||||
superclass = "SOGoAppointmentFolder";
|
superclass = "SOGoAppointmentFolder";
|
||||||
|
defaultRoles = {
|
||||||
|
"Access Contents Information" = ( "Owner", "AuthorizedSubscriber" );
|
||||||
|
};
|
||||||
};
|
};
|
||||||
// SOGoGroupAppointmentFolder = {
|
|
||||||
// superclass = "SOGoAppointmentFolder";
|
|
||||||
// };
|
|
||||||
SOGoCalendarComponent = {
|
SOGoCalendarComponent = {
|
||||||
superclass = "SOGoContentObject";
|
superclass = "SOGoContentObject";
|
||||||
defaultRoles = {
|
defaultRoles = {
|
||||||
|
|
Loading…
Reference in New Issue