From 7663cdc37d5d37441105d8eb1a6d0e45ee45a566 Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Fri, 23 Oct 2009 21:00:49 +0000 Subject: [PATCH 1/6] See ChangeLog Monotone-Parent: 5cc529e77d87c48d01d645b60e6978e296c9f09a Monotone-Revision: 7c369f5daacf319b74a648fea43f833dda69d81d Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2009-10-23T21:00:49 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 5 +++++ SoObjects/SOGo/SOGoUserFolder.m | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 01a314f7a..a3f9fa915 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-10-23 Ludovic Marcotte + + * SoObjects/SOGo/SOGoUserFolder.m (-subFoldersFromFolder:) + Addded a check to NOT return web calendars in this query. + 2009-10-23 Francis Lachapelle * UI/MailerUI/UIxMailMainFrame.m (-formattedMailtoString:): fixed diff --git a/SoObjects/SOGo/SOGoUserFolder.m b/SoObjects/SOGo/SOGoUserFolder.m index 1bcdb660d..e55f8bce9 100644 --- a/SoObjects/SOGo/SOGoUserFolder.m +++ b/SoObjects/SOGo/SOGoUserFolder.m @@ -170,7 +170,8 @@ static NSString *LDAPContactInfoAttribute = nil; if (![securityManager validatePermission: SOGoPerm_AccessObject onObject: currentFolder inContext: context] && [[currentFolder ownerInContext: context] - isEqualToString: folderOwner]) + isEqualToString: folderOwner] + && [NSStringFromClass([currentFolder class]) compare: @"SOGoWebAppointmentFolder"] != NSOrderedSame) { folderName = [NSString stringWithFormat: @"/%@/%@", [parentFolder nameInContainer], From 23583d2e867a5d8fb870703da5152297314cd3b2 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 23 Oct 2009 21:04:02 +0000 Subject: [PATCH 2/6] Monotone-Parent: 4f0bf8feeb9303c272c290edf3a27a53d5f0e7f6 Monotone-Revision: b2a6613b1d3ed16ddb16ffa95f6c3e5eddd14422 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-10-23T21:04:02 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 5 +++ SoObjects/SOGo/SOGoUserManager.m | 66 ++++++++++++++++++++------------ 2 files changed, 47 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6d4e4c3c8..c26c05cdc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-10-23 Wolfgang Sourdeau + + * SoObjects/SOGo/SOGoUserManager.m (_registerSource:): added + sanity checks and warnings to the user. + 2009-10-22 Ludovic Marcotte * SoObjects/SOGo/SOGoUserManager.m diff --git a/SoObjects/SOGo/SOGoUserManager.m b/SoObjects/SOGo/SOGoUserManager.m index 7acc5a271..fdeedc50a 100644 --- a/SoObjects/SOGo/SOGoUserManager.m +++ b/SoObjects/SOGo/SOGoUserManager.m @@ -104,36 +104,54 @@ static NSLock *lock = nil; NSString *sourceID, *value, *type; NSMutableDictionary *metadata; id ldapSource; + BOOL isAddressBook; Class c; sourceID = [udSource objectForKey: @"id"]; - type = [udSource objectForKey: @"type"]; + if ([sourceID length] > 0) + { + type = [udSource objectForKey: @"type"]; - if (!type || [type caseInsensitiveCompare: @"ldap"] == NSOrderedSame) - c = [LDAPSource class]; - else - c = [SQLSource class]; + if (!type || [type caseInsensitiveCompare: @"ldap"] == NSOrderedSame) + c = [LDAPSource class]; + else + c = [SQLSource class]; - ldapSource = [c sourceFromUDSource: udSource]; - if (sourceID) - [_sources setObject: ldapSource forKey: sourceID]; + ldapSource = [c sourceFromUDSource: udSource]; + if (sourceID) + [_sources setObject: ldapSource forKey: sourceID]; + else + [self errorWithFormat: @"id field missing in an user source," + @" check the SOGoUserSources defaults"]; + metadata = [NSMutableDictionary dictionary]; + value = [udSource objectForKey: @"canAuthenticate"]; + if (value) + [metadata setObject: value forKey: @"canAuthenticate"]; + value = [udSource objectForKey: @"isAddressBook"]; + if (value) + { + [metadata setObject: value forKey: @"isAddressBook"]; + isAddressBook = [value boolValue]; + } + else + isAddressBook = NO; + value = [udSource objectForKey: @"displayName"]; + if (value) + [metadata setObject: value forKey: @"displayName"]; + else + { + if (isAddressBook) + [self errorWithFormat: @"addressbook source '%@' has" + @" no displayname", sourceID]; + } + value = [udSource objectForKey: @"MailFieldNames"]; + if (value) + [metadata setObject: value forKey: @"MailFieldNames"]; + [_sourcesMetadata setObject: metadata forKey: sourceID]; + } else - [self errorWithFormat: @"id field missing in an user source," - @" check the SOGoUserSources defaults"]; - metadata = [NSMutableDictionary dictionary]; - value = [udSource objectForKey: @"canAuthenticate"]; - if (value) - [metadata setObject: value forKey: @"canAuthenticate"]; - value = [udSource objectForKey: @"isAddressBook"]; - if (value) - [metadata setObject: value forKey: @"isAddressBook"]; - value = [udSource objectForKey: @"displayName"]; - if (value) - [metadata setObject: value forKey: @"displayName"]; - value = [udSource objectForKey: @"MailFieldNames"]; - if (value) - [metadata setObject: value forKey: @"MailFieldNames"]; - [_sourcesMetadata setObject: metadata forKey: sourceID]; + [self errorWithFormat: @"attempted to register a contact/user source" + @" without id (skipped)"]; } - (void) _prepareSourcesWithDefaults: (NSUserDefaults *) ud From e7e31ef543bf0a694f0393ddc1c53aefd5da2c5b Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 23 Oct 2009 21:06:05 +0000 Subject: [PATCH 3/6] Monotone-Parent: b2a6613b1d3ed16ddb16ffa95f6c3e5eddd14422 Monotone-Revision: 3f0a698566b940e183824009e4aae638d5263054 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-10-23T21:06:05 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 4 ++++ SoObjects/Contacts/SOGoContactSourceFolder.m | 2 ++ 2 files changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index c26c05cdc..b2ba962a8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2009-10-23 Wolfgang Sourdeau + * SoObjects/Contacts/SOGoContactSourceFolder.m + (-initWithName:andDisplayName:inContainer:): use the source name + when the displayname is nil. + * SoObjects/SOGo/SOGoUserManager.m (_registerSource:): added sanity checks and warnings to the user. diff --git a/SoObjects/Contacts/SOGoContactSourceFolder.m b/SoObjects/Contacts/SOGoContactSourceFolder.m index 472ffa03d..83fa114e2 100644 --- a/SoObjects/Contacts/SOGoContactSourceFolder.m +++ b/SoObjects/Contacts/SOGoContactSourceFolder.m @@ -124,6 +124,8 @@ if ((self = [self initWithName: newName inContainer: newContainer])) { + if (![newDisplayName length]) + newDisplayName = newName; ASSIGN (displayName, newDisplayName); } From 5b53a774b40e11a66b033201c23395389c1ef14b Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 23 Oct 2009 21:10:42 +0000 Subject: [PATCH 4/6] Monotone-Parent: 991fcab97beb9fd908675007805ffd9ce421800e Monotone-Revision: 760d573fee6952b29d9ca4af9a156792105a962b Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-10-23T21:10:42 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 1 + SoObjects/Contacts/SOGoContactSourceFolder.m | 1 + 2 files changed, 2 insertions(+) diff --git a/ChangeLog b/ChangeLog index 1b7b90a41..f93cd2b65 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ * SoObjects/Contacts/SOGoContactSourceFolder.m (-initWithName:andDisplayName:inContainer:): use the source name when the displayname is nil. + (-dealloc): we release the display name to avoid a leak. * SoObjects/SOGo/SOGoUserManager.m (_registerSource:): added sanity checks and warnings to the user. diff --git a/SoObjects/Contacts/SOGoContactSourceFolder.m b/SoObjects/Contacts/SOGoContactSourceFolder.m index 83fa114e2..f90de406f 100644 --- a/SoObjects/Contacts/SOGoContactSourceFolder.m +++ b/SoObjects/Contacts/SOGoContactSourceFolder.m @@ -136,6 +136,7 @@ { [entries release]; [source release]; + [displayName release]; [super dealloc]; } From 004ea35949a0ec4223a5c81d96073db2347816d0 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 23 Oct 2009 21:12:56 +0000 Subject: [PATCH 5/6] Monotone-Parent: 760d573fee6952b29d9ca4af9a156792105a962b Monotone-Revision: eeae79c5816e9c12b07d69ba81d361d553859728 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-10-23T21:12:56 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 1 - SoObjects/Contacts/SOGoContactSourceFolder.m | 1 - 2 files changed, 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f93cd2b65..1b7b90a41 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,7 +3,6 @@ * SoObjects/Contacts/SOGoContactSourceFolder.m (-initWithName:andDisplayName:inContainer:): use the source name when the displayname is nil. - (-dealloc): we release the display name to avoid a leak. * SoObjects/SOGo/SOGoUserManager.m (_registerSource:): added sanity checks and warnings to the user. diff --git a/SoObjects/Contacts/SOGoContactSourceFolder.m b/SoObjects/Contacts/SOGoContactSourceFolder.m index f90de406f..83fa114e2 100644 --- a/SoObjects/Contacts/SOGoContactSourceFolder.m +++ b/SoObjects/Contacts/SOGoContactSourceFolder.m @@ -136,7 +136,6 @@ { [entries release]; [source release]; - [displayName release]; [super dealloc]; } From e30a6ca1704f4a285c1ecebb86bd18131f6ee5db Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 23 Oct 2009 21:15:00 +0000 Subject: [PATCH 6/6] Monotone-Parent: eeae79c5816e9c12b07d69ba81d361d553859728 Monotone-Revision: ae600dde90a09517ff2cad4629bd94dc68652e03 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-10-23T21:15:00 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1b7b90a41..f9c53a7e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2314,7 +2314,7 @@ 2009-03-24 Francis Lachapelle * SoObjects/SOGo/SOGoUser.m ([SOGoUser -invalidateLanguage]): - new method to invalidate the language ivar. + new method to invalidate the language ivar. * UI/MainUI/SOGoRootPage.m ([SOGoRootPage -connectAction]): must invalidate user's language ivar when it changes. @@ -2467,10 +2467,10 @@ * UI/MainUI/SOGoRootPage.m ([SOGoRootPage -version]): new method that returns the application version. - + * SOPE/NGCards/iCalDateTime.m ([iCalDateTime -dateTime]): when not defined, the timezone is now guessed from the date of the current object. - + 2009-03-18 Ludovic Marcotte * Updated the documentation for the SOGo @@ -2548,7 +2548,7 @@ * UI/Scheduler/UIxCalListingActions.m ([UIxCalListingActions -_fixDates:]): moved corrections for daylight saving time in this new method. - + * SoObjects/Appointments/SOGoAppointmentFolder.m ([SOGoAppointmentFolder -fixupCycleRecord:_recordcycleRange:_rfirstInstanceCalendarDateRange:_firforViewRange:_viewRange]): @@ -2890,7 +2890,7 @@ this new method. 2009-01-06 Ludovic Marcotte - + * SoObjects/Appointments/SOGoCalendarComponent.m ([SOGoCalendarComponent -_filterComponent:]): We now set the proper component summary just like @@ -3040,7 +3040,7 @@ at once. 2008-12-14 Ludovic Marcotte - + * SoObjects/Appointments/SOGoAppointmentFolder.m ([SOGoAppointmentFolder -_buildStripFieldsFromFields:]): Don't strip the c_isopaque for the DAndTViewer role. @@ -3114,7 +3114,7 @@ ([UIxMailPartICalActions -_setupChosenEventAndEventObject:]): fixed comparison of the calendar and email event when dealing with an occurence of a repeating event. - ([UIxMailPartICalActions -_updateAttendee:ownerUser:forEventUID:withRecurrenceId:forUID:shouldAddSentBy:]): + ([UIxMailPartICalActions -_updateAttendee:ownerUser:forEventUID:withRecurrenceId:forUID:shouldAddSentBy:]): fixed handling of status update for one occurence of a repeating event. * SoObjects/Appointments/SOGoAppointmentObject.m @@ -3169,7 +3169,7 @@ * We no longer show the previous/new location if it's empty in the invitation update templates. -2008-11-26 Ludovic Marcotte +2008-11-26 Ludovic Marcotte * SoObjects/SOGo/SOGoGCSFolder.m We correctly wrap ACL additions around a @@ -3285,7 +3285,7 @@ the SENT-BY into account. 2008-11-11 Ludovic Marcotte - + * Fixed a couple of issues in the new pref caching subsystem. * Cleaned up the caching code and activated @@ -3344,7 +3344,7 @@ * UI/Contacts/UIxContactFoldersView.m ([WOActionResults allContactSearchAction]): returned array is now properly initialized if no result is found. - + 2008-10-15 Wolfgang Sourdeau * UI/MailerUI/UIxMailListView.m ([UIxMailListView @@ -3596,8 +3596,8 @@ 2008-09-08 Ludovic Marcotte * SoObjects/SOGo/LDAPSource.m ([LDAPSource - -checkLogin:loginToCheckandPassword:passwordToCheck]) - ([LDAPSource -allEntryIDs]) + -checkLogin:loginToCheckandPassword:passwordToCheck]) + ([LDAPSource -allEntryIDs]) ([LDAPSource -fetchContactsMatching:match]) ([LDAPSource -lookupContactEntry:entryID]) ([LDAPSource -lookupContactEntryWithUIDorEmail:uid]): catch any @@ -3716,7 +3716,7 @@ found, we try "body"->"parts". 2008-08-26 Francis Lachapelle - + * UI/MailerUI/UIxMailMainFrame.m ([composeAction]): build the contact's fullname from its card's attribute "n" if "fn" is not defined. @@ -3836,7 +3836,7 @@ UI/WebServerResources/tbtv_leaf_corner_17x17.gif UI/WebServerResources/tbtv_sent_17x17.gif UI/WebServerResources/tbtv_trash_17x17.gif - + 2008-08-20 Wolfgang Sourdeau * UI/PreferencesUI/UIxAdditionalPreferences.[hm]: new template @@ -5142,7 +5142,7 @@ per-connection cache mechanism. 2008-01-16 Ludovic Marcotte - + * Minor adjustments / bug fixes to previous commit. 2008-01-14 Ludovic Marcotte @@ -5166,7 +5166,7 @@ comma-separated list of email addresses. 2007-12-21 Ludovic Marcotte - + * UI/Contacts/UIxContactView.m Modified -secondaryEmail so that we always get the "last" email address in case no preferred @@ -5223,7 +5223,7 @@ encoded by SOPE. * SoObjects/Mailer/SOGoDraftObject.m - Minor cleanups. + Minor cleanups. 2007-12-13 Francis Lachapelle @@ -5295,7 +5295,7 @@ * UI/MailPartViewers/UIxMailRenderingContext.{h,m} Removed template caching which added very little and created re-entrant issues. - + * UI/MailPartViewers/UIxMailPartHTMLViewer.m Added a hack (and stated so in the source file) to avoid what seems to be a bug in libxml. @@ -5640,9 +5640,9 @@ * SoObjects/Mailer/SOGoDraftObject.m Modified _fillInReplyAddresses:replyToAll:envelope: so that if there's no recipient, we add at least - ourself to the list. + ourself to the list. Fixed a mem leak in the same method. - + 2007-11-22 Wolfgang Sourdeau * UI/MailPartViewers/UIxMailRenderingContext.m @@ -6622,12 +6622,12 @@ * UI/WebServerResources/MailerUI.js We check if at least one message is selected before performing a Reply/Reply All/Forward - + * SoObjects/Appointments/SOGoAppointmentFolder.m and others - implemented support for recurring events (with some known limitations right now, all soon to be fixed). - + 2007-10-04 Francis Lachapelle * Main/SOGo.m ([SOGo -isUserName:_keyinContext:_ctx]): removed @@ -6796,7 +6796,7 @@ * UI/SOGoUI/UIxComponent.m ([UIxComponent -responseWith204]): new method that returns a WOResponse initialized with the 204 status code. - + * UI/MailerUI/UIxMailListView.m ([UIxMailListView -sortedUIDs]): always use a "not deleted" search qualifier along with the user qualifier (if present). @@ -9102,7 +9102,7 @@ * SoObjects/SOGo/NSArray+Utilities.m: added an implementation of makeObjectsPerform:withObject:withObject: for GNUstep compatibility. - + * OGoContentStore/GNUmakefile, Protocols/common.make, SoObjects/common.make, UI/common.make: install in GNUSTEP_INSTALLATION_DIR instead of GNUSTEP_USER_DIR. @@ -10999,5 +10999,5 @@ SOGoDefaultMailDomain preference key. 2006-06-15 ludovic@inverse.ca - + * Initial import of SOGo from trunk.