From 2ba7ae4c89bcde72e14e88cbea96c85e97727da1 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 4 Jul 2007 20:10:45 +0000 Subject: [PATCH] Monotone-Parent: 23e776c8c54fe02739326119a5d6519e81abc605 Monotone-Revision: 6a2b142b86238b6988137e5c25e428fc7a5f4ef7 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-07-04T20:10:45 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 7 +++++++ SoObjects/Appointments/SOGoAppointmentFolder.m | 7 ++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index deffdb041..a3b465231 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2007-07-04 Wolfgang Sourdeau + * SoObjects/Appointments/SOGoAppointmentFolder.m + ([SOGoAppointmentFolder -calendarFolders]): read the calendar + folders of the user to whom this folder belongs instead of the + active user. This way, a delegate user will be able to have the + same view that the original user has if he connects from his user + directory. + * Main/SOGo.m ([SOGo -lookupUser:_keyinContext:]): check if the user exists before creating the SOGoUserFolder instance. If not, returns nil. diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.m b/SoObjects/Appointments/SOGoAppointmentFolder.m index 6f098b7b5..4e7257c30 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -1229,20 +1229,21 @@ static NSNumber *sharedYes = nil; { NSMutableDictionary *userCalendar, *calendarDict; NSMutableArray *calendarFolders; - SOGoUser *activeUser; + SOGoUser *calendarUser; BOOL firstActive; calendarFolders = [NSMutableArray new]; [calendarFolders autorelease]; - activeUser = [context activeUser]; + calendarUser = [SOGoUser userWithLogin: [self ownerInContext: context] + roles: nil]; userCalendar = [NSMutableDictionary new]; [userCalendar autorelease]; [userCalendar setObject: @"/" forKey: @"folder"]; [userCalendar setObject: @"Calendar" forKey: @"displayName"]; [calendarFolders addObject: userCalendar]; - calendarDict = [[activeUser userSettings] objectForKey: @"Calendar"]; + calendarDict = [[calendarUser userSettings] objectForKey: @"Calendar"]; firstActive = [[calendarDict objectForKey: @"activateUserFolder"] boolValue]; firstActive = ([self _appendSubscribedFolders: [calendarDict objectForKey: @"SubscribedFolders"]