mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-06-26 04:14:19 +00:00
feat(api): add endpoint for caldav/cardav url
This commit is contained in:
@@ -139,6 +139,13 @@ size_t curl_body_function(void *ptr, size_t size, size_t nmemb, void *buffer)
|
||||
return NO;
|
||||
}
|
||||
sd = [SOGoSystemDefaults sharedSystemDefaults];
|
||||
|
||||
if(![[sd authenticationType] isEqualToString: @"openid"])
|
||||
{
|
||||
[self errorWithFormat: @"Sogo SOGoAuthenticationType is not openid"];
|
||||
return NO;
|
||||
}
|
||||
|
||||
return ([sd openIdConfigUrl] && [sd openIdScope] && [sd openIdClient] && [sd openIdClientSecret]);
|
||||
}
|
||||
|
||||
@@ -206,7 +213,7 @@ size_t curl_body_function(void *ptr, size_t size, size_t nmemb, void *buffer)
|
||||
}
|
||||
else
|
||||
{
|
||||
[self errorWithFormat: @"Missing parameters from sogo.conf"];
|
||||
[self errorWithFormat: @"LoginTypebyDOmain - Openid not found or missing parameters for domain", _domain];
|
||||
}
|
||||
}
|
||||
else if ([[self class] checkUserConfig])
|
||||
|
||||
@@ -122,28 +122,28 @@ static NSString *productDirectoryName = @"SOGo";
|
||||
|
||||
pathes = [[self productSearchPathes] objectEnumerator];
|
||||
while ((lpath = [pathes nextObject]))
|
||||
{
|
||||
productNames = [[fm directoryContentsAtPath: lpath] objectEnumerator];
|
||||
while ((productName = [productNames nextObject]))
|
||||
{
|
||||
productNames = [[fm directoryContentsAtPath: lpath] objectEnumerator];
|
||||
while ((productName = [productNames nextObject]))
|
||||
{
|
||||
if ([[productName pathExtension] isEqualToString: @"SOGo"])
|
||||
{
|
||||
bpath = [lpath stringByAppendingPathComponent: productName];
|
||||
[registry registerProductAtPath: bpath];
|
||||
[loadedProducts addObject: productName];
|
||||
}
|
||||
}
|
||||
if ([loadedProducts count])
|
||||
if ([[productName pathExtension] isEqualToString: @"SOGo"])
|
||||
{
|
||||
if (verbose)
|
||||
{
|
||||
[self logWithFormat: @"SOGo products loaded from '%@':", lpath];
|
||||
[self logWithFormat: @" %@",
|
||||
[loadedProducts componentsJoinedByString: @", "]];
|
||||
}
|
||||
[loadedProducts removeAllObjects];
|
||||
bpath = [lpath stringByAppendingPathComponent: productName];
|
||||
[registry registerProductAtPath: bpath];
|
||||
[loadedProducts addObject: productName];
|
||||
}
|
||||
}
|
||||
if ([loadedProducts count])
|
||||
{
|
||||
if (verbose)
|
||||
{
|
||||
[self logWithFormat: @"SOGo products loaded from '%@':", lpath];
|
||||
[self logWithFormat: @" %@",
|
||||
[loadedProducts componentsJoinedByString: @", "]];
|
||||
}
|
||||
[loadedProducts removeAllObjects];
|
||||
}
|
||||
}
|
||||
|
||||
if (![registry loadAllProducts] && verbose)
|
||||
[self warnWithFormat: @"could not load all products !"];
|
||||
|
||||
@@ -83,6 +83,7 @@ static const NSString *kDisableSharingCalendar = @"Calendar";
|
||||
- (BOOL) uixDebugEnabled;
|
||||
- (BOOL) easDebugEnabled;
|
||||
- (BOOL) openIdDebugEnabled;
|
||||
- (BOOL) apiDebugEnabled;
|
||||
- (BOOL) tnefDecoderDebugEnabled;
|
||||
- (BOOL) xsrfValidationEnabled;
|
||||
|
||||
|
||||
@@ -654,6 +654,11 @@ _injectConfigurationFromFile (NSMutableDictionary *defaultsDict,
|
||||
return [self boolForKey: @"SOGoOpenIDDebugEnabled"];
|
||||
}
|
||||
|
||||
- (BOOL) apiDebugEnabled
|
||||
{
|
||||
return [self boolForKey: @"SOGoAPIDebugEnabled"];
|
||||
}
|
||||
|
||||
- (BOOL) tnefDecoderDebugEnabled
|
||||
{
|
||||
return [self boolForKey: @"SOGoTnefDecoderDebugEnabled"];
|
||||
|
||||
Reference in New Issue
Block a user