Add an easy way to get the personal contact folder, just like we have for calendars

pull/17/merge
Ludovic Marcotte 2014-01-10 14:03:50 -05:00
parent 689a1e94e0
commit 13721b961b
2 changed files with 16 additions and 2 deletions

View File

@ -45,6 +45,7 @@
@class SOGoAppointmentFolder;
@class SOGoAppointmentFolders;
@class SOGoContactFolder;
@class SOGoDateFormatter;
@class SOGoDomainDefaults;
@class SOGoUserDefaults;
@ -130,6 +131,7 @@
- (SOGoUserFolder *) homeFolderInContext: (id) context;
- (SOGoAppointmentFolders *) calendarsFolderInContext: (WOContext *) context;
- (SOGoAppointmentFolder *) personalCalendarFolderInContext: (WOContext *) context;
- (SOGoContactFolder *) personalContactsFolderInContext: (WOContext *) context;
@end

View File

@ -841,13 +841,25 @@
acquire: NO];
}
- (SOGoAppointmentFolder *)
personalCalendarFolderInContext: (WOContext *) context
- (SOGoAppointmentFolder *) personalCalendarFolderInContext: (WOContext *) context
{
return [[self calendarsFolderInContext: context] lookupPersonalFolder: @"personal"
ignoringRights: YES];
}
- (SOGoContactFolder *) personalContactsFolderInContext: (WOContext *) context
{
SOGoContactFolders *folders;
folders = [[self homeFolderInContext: context] lookupName: @"Contacts"
inContext: context
acquire: NO];
return [folders lookupPersonalFolder: @"personal"
ignoringRights: YES];
}
- (NSArray *) rolesForObject: (NSObject *) object
inContext: (WOContext *) context
{