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"]