diff --git a/ChangeLog b/ChangeLog index 7cc9183ea..3bdbd22df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,16 @@ 2007-08-24 Wolfgang Sourdeau + * SoObjects/Appointments/SOGoAppointmentFolder.m ([SOGoAppointmentFolder -aclUsersForObjectAtPath:objectPathArray]) + ([SOGoAppointmentFolder -aclsForUser:uidforObjectAtPath:objectPathArray]) + ([SOGoAppointmentFolder -setRoles:rolesforUser:uidforObjectAtPath:objectPathArray]) + ([SOGoAppointmentFolder + -removeAclsForUsers:usersforObjectAtPath:objectPathArray]): + override those methods to use the "personal" additional directory. + + * SoObjects/SOGo/SOGoUserFolder.m ([-ocsPrivateCalendarPath]): + append "/personal" to the calendar path to simulate a single + calendar in a choice of many. + * SoObjects/Mailer/SOGoMailFolder.m ([SOGoMailFolder -lookupName:_keyinContext:acquire:_acquire]): moved the lookup methods back here. Moved the folder existence check here, and do diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.m b/SoObjects/Appointments/SOGoAppointmentFolder.m index 5e7955a7e..a5314d019 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -1297,4 +1297,47 @@ static NSNumber *sharedYes = nil; return @"IPF.Appointment"; } +/* hack until we permit more than 1 cal per user */ +- (NSArray *) _fixedPath: (NSArray *) objectPath +{ + NSMutableArray *newPath; + + newPath = [NSMutableArray arrayWithArray: objectPath]; + if ([newPath count] > 2 + && ![[newPath objectAtIndex: 2] isEqualToString: @"personal"]) + [newPath insertObject: @"personal" atIndex: 2]; + else + [newPath addObject: @"personal"]; + + return newPath; +} + +- (NSArray *) aclUsersForObjectAtPath: (NSArray *) objectPathArray +{ + return [super aclUsersForObjectAtPath: [self _fixedPath: objectPathArray]]; +} + +- (NSArray *) aclsForUser: (NSString *) uid + forObjectAtPath: (NSArray *) objectPathArray +{ + return [super aclsForUser: uid + forObjectAtPath: [self _fixedPath: objectPathArray]]; +} + +- (void) setRoles: (NSArray *) roles + forUser: (NSString *) uid + forObjectAtPath: (NSArray *) objectPathArray +{ + [super setRoles: roles + forUser: uid + forObjectAtPath: [self _fixedPath: objectPathArray]]; +} + +- (void) removeAclsForUsers: (NSArray *) users + forObjectAtPath: (NSArray *) objectPathArray +{ + [super removeAclsForUsers: users + forObjectAtPath: [self _fixedPath: objectPathArray]]; +} + @end /* SOGoAppointmentFolder */