From 891f31d0b1e3db91afeb81f97573ecdea027bd2f Mon Sep 17 00:00:00 2001 From: C Robert Date: Thu, 15 Oct 2009 21:33:56 +0000 Subject: [PATCH] See ChangeLog Monotone-Parent: c6f02e683516d8272f34a92875af92b45b067767 Monotone-Revision: d7f6037ae6e1e2123a306d459ff6f96271bfc190 Monotone-Author: crobert@inverse.ca Monotone-Date: 2009-10-15T21:33:56 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 11 +++++++ .../Appointments/SOGoAppointmentFolder.m | 6 ++-- .../Appointments/SOGoAppointmentFolders.m | 30 +++++++++++++++++++ SoObjects/SOGo/SOGoObject.h | 2 ++ SoObjects/SOGo/SOGoWebDAVAclManager.h | 2 +- SoObjects/SOGo/SOGoWebDAVAclManager.m | 10 +++++++ 6 files changed, 57 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index c8cc64db2..221b80ce3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2009-10-15 Cyril Robert + + * SoObjects/Appointments/SOGoAppointmentFolders.m + (+webdavAclManager): Added to fix issues with iPhones (3.1.2) + * SoObjects/Appointments/SOGoAppointmentFolder.m + (+webdavAclManager): Changed write-properties and write-content to + non-abstract, and set the equivalent for write-content to + SoPerm_AddDocumentsImagesAndFiles + * SoObjects/SOGo/SOGoWebDAVAclManager.m (-copyWithZone:): Added to allow + object copy (useful for SOGoAppointmentFolders) + 2009-10-15 Ludovic Marcotte * Added SOPE/NGCards/TimeZones/* - generated from diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.m b/SoObjects/Appointments/SOGoAppointmentFolder.m index 9cf120f8d..848da0577 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -221,13 +221,13 @@ static int davCalendarStartTimeLimit, davTimeLimitSeconds, asChildOf: davElement (@"write", XMLNS_WEBDAV)]; [aclManager registerDAVPermission: davElement (@"write-properties", XMLNS_WEBDAV) - abstract: YES + abstract: NO withEquivalent: SoPerm_ChangePermissions /* hackish */ asChildOf: davElement (@"write", XMLNS_WEBDAV)]; [aclManager registerDAVPermission: davElement (@"write-content", XMLNS_WEBDAV) - abstract: YES - withEquivalent: nil + abstract: NO + withEquivalent: SoPerm_AddDocumentsImagesAndFiles asChildOf: davElement (@"write", XMLNS_WEBDAV)]; [aclManager registerDAVPermission: davElement (@"admin", nsI) abstract: YES diff --git a/SoObjects/Appointments/SOGoAppointmentFolders.m b/SoObjects/Appointments/SOGoAppointmentFolders.m index bde129c67..082cad2c9 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolders.m +++ b/SoObjects/Appointments/SOGoAppointmentFolders.m @@ -39,6 +39,10 @@ #import #import #import +#import +#import +#import + #import "SOGoAppointmentFolder.h" #import "SOGoWebAppointmentFolder.h" @@ -341,4 +345,30 @@ return error; } ++ (SOGoWebDAVAclManager *) webdavAclManager +{ + static SOGoWebDAVAclManager *aclManager = nil; + + if (!aclManager) + { + aclManager = [[super webdavAclManager] copy]; + [aclManager + registerDAVPermission: davElement (@"write", XMLNS_WEBDAV) + abstract: NO + withEquivalent: SoPerm_AddDocumentsImagesAndFiles + asChildOf: davElement (@"all", XMLNS_WEBDAV)]; + [aclManager + registerDAVPermission: davElement (@"write-properties", XMLNS_WEBDAV) + abstract: YES + withEquivalent: SoPerm_AddDocumentsImagesAndFiles + asChildOf: davElement (@"write", XMLNS_WEBDAV)]; + [aclManager + registerDAVPermission: davElement (@"write-content", XMLNS_WEBDAV) + abstract: YES + withEquivalent: SoPerm_AddDocumentsImagesAndFiles + asChildOf: davElement (@"write", XMLNS_WEBDAV)]; + } + return aclManager; +} + @end diff --git a/SoObjects/SOGo/SOGoObject.h b/SoObjects/SOGo/SOGoObject.h index 324357bf4..11d8bf203 100644 --- a/SoObjects/SOGo/SOGoObject.h +++ b/SoObjects/SOGo/SOGoObject.h @@ -82,6 +82,8 @@ SEL SOGoSelectorForPropertySetter (NSString *property); - (id) initWithName: (NSString *) _name inContainer:(id)_container; ++ (SOGoWebDAVAclManager *) webdavAclManager; + /* accessors */ - (NSString *) nameInContainer; diff --git a/SoObjects/SOGo/SOGoWebDAVAclManager.h b/SoObjects/SOGo/SOGoWebDAVAclManager.h index 9cfc76737..ebe0aab5b 100644 --- a/SoObjects/SOGo/SOGoWebDAVAclManager.h +++ b/SoObjects/SOGo/SOGoWebDAVAclManager.h @@ -33,7 +33,7 @@ @class SOGoUser; @class SOGoWebDAVValue; -@interface SOGoWebDAVAclManager : NSObject +@interface SOGoWebDAVAclManager : NSObject { NSMutableDictionary *aclTree; } diff --git a/SoObjects/SOGo/SOGoWebDAVAclManager.m b/SoObjects/SOGo/SOGoWebDAVAclManager.m index 1a32e45a0..446157430 100644 --- a/SoObjects/SOGo/SOGoWebDAVAclManager.m +++ b/SoObjects/SOGo/SOGoWebDAVAclManager.m @@ -262,4 +262,14 @@ static NSNumber *yesObject = nil; [aclTree objectForKey: @"{DAV:}all"]]; } +- (id) copyWithZone: (NSZone *) aZone +{ + SOGoWebDAVAclManager *x; + + x = [[SOGoWebDAVAclManager allocWithZone: aZone] init]; + x->aclTree = [aclTree mutableCopyWithZone: aZone]; + + return x; +} + @end