mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-24 15:42:43 +00:00
fix(calendar): Fix inaccessibility to personal calendar on Mac OS X Ventura. Fixes #5639
This commit is contained in:
@@ -2548,7 +2548,7 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
|
||||
XMLNS_GROUPDAV, nil];
|
||||
[colType addObject: gdVTodoCol];
|
||||
}
|
||||
if ([nameInContainer isEqualToString: @"personal"])
|
||||
if ([nameInContainer isEqualToString: @"personal"] || [nameInContainer isEqualToString: @"Personal"])
|
||||
[colType addObject: [NSArray arrayWithObjects: @"schedule-outbox",
|
||||
XMLNS_CALDAV, nil]];
|
||||
}
|
||||
|
||||
@@ -189,8 +189,8 @@
|
||||
}
|
||||
|
||||
- (NSArray *) davCalendarScheduleOutboxURL
|
||||
{
|
||||
return [self _davSpecialCalendarURLWithName: @"personal"];
|
||||
{
|
||||
return [[context request] isMacOSXVenturaCalendarApp] ? [self _davSpecialCalendarURLWithName: @"Personal"] : [self _davSpecialCalendarURLWithName: @"personal"];
|
||||
}
|
||||
|
||||
- (NSArray *) _calendarProxiedUsersWithWriteAccess: (BOOL) write
|
||||
|
||||
@@ -136,6 +136,12 @@ static NSString *inboxFolderName = @"INBOX";
|
||||
namespaceDict = [client namespace];
|
||||
|
||||
namespace = [namespaceDict objectForKey: @"personal"];
|
||||
// FIXME: Improve MacOSX Ventura support
|
||||
// Check if the problem will be fixed by Apple or if this fix should be kept in the future
|
||||
// Ticket #5639
|
||||
if ([[context request] isMacOSXVenturaCalendarApp]) {
|
||||
namespace = [namespaceDict objectForKey: @"Personal"];
|
||||
}
|
||||
if (namespace)
|
||||
[self _appendNamespace: namespace toFolders: folders];
|
||||
|
||||
|
||||
@@ -200,16 +200,16 @@
|
||||
|
||||
selfName = [self realNameInContainer];
|
||||
otherName = [otherFolder realNameInContainer];
|
||||
if ([selfName isEqualToString: @"personal"])
|
||||
if ([selfName isEqualToString: @"personal"] || [selfName isEqualToString: @"Personal"])
|
||||
{
|
||||
if ([otherName isEqualToString: @"personal"])
|
||||
if ([otherName isEqualToString: @"personal"] || [otherName isEqualToString: @"Personal"])
|
||||
comparison = NSOrderedSame;
|
||||
else
|
||||
comparison = NSOrderedAscending;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ([otherName isEqualToString: @"personal"])
|
||||
if ([otherName isEqualToString: @"personal"] || [otherName isEqualToString: @"Personal"])
|
||||
comparison = NSOrderedDescending;
|
||||
else
|
||||
comparison = NSOrderedSame;
|
||||
|
||||
@@ -150,7 +150,7 @@ static NSArray *childRecordFields = nil;
|
||||
if ([pathElements count] > 1)
|
||||
ocsName = [pathElements objectAtIndex: 1];
|
||||
else
|
||||
ocsName = @"personal";
|
||||
ocsName = [[context request] isMacOSXVenturaCalendarApp] ? @"Personal" : @"personal";
|
||||
|
||||
path = [NSString stringWithFormat: @"/Users/%@/%@/%@",
|
||||
login, [pathElements objectAtIndex: 0], ocsName];
|
||||
|
||||
@@ -173,7 +173,7 @@ static SoSecurityManager *sm = nil;
|
||||
{
|
||||
if (folderType == SOGoPersonalFolder)
|
||||
{
|
||||
folderName = @"personal";
|
||||
folderName = [[context request] isMacOSXVenturaCalendarApp] ? @"Personal" : @"personal";
|
||||
folder = [subFolderClass objectWithName: folderName inContainer: self];
|
||||
[folder setDisplayName: [self defaultFolderName]];
|
||||
[folder setOCSPath: [NSString stringWithFormat: @"%@/%@", OCSPath, folderName]];
|
||||
@@ -241,7 +241,7 @@ static SoSecurityManager *sm = nil;
|
||||
}
|
||||
if (folderType == SOGoPersonalFolder)
|
||||
{
|
||||
if (![subFolders objectForKey: @"personal"])
|
||||
if (![subFolders objectForKey: @"personal"] || ![subFolders objectForKey: @"Personal"])
|
||||
[self createSpecialFolder: SOGoPersonalFolder];
|
||||
}
|
||||
else if (folderType == SOGoCollectedFolder)
|
||||
|
||||
@@ -1059,7 +1059,7 @@
|
||||
|
||||
- (SOGoAppointmentFolder *) personalCalendarFolderInContext: (WOContext *) context
|
||||
{
|
||||
return [[self calendarsFolderInContext: context] lookupPersonalFolder: @"personal"
|
||||
return [[self calendarsFolderInContext: context] lookupPersonalFolder: [[context request] isMacOSXVenturaCalendarApp] ? @"Personal" : @"personal"
|
||||
ignoringRights: YES];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user