mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-05 16:35:10 +00:00
(fix) more fixes and clarifications on the mutli-domain settings
This commit is contained in:
@@ -165,8 +165,9 @@
|
||||
// The domain is probably appended to the username;
|
||||
// make sure it is defined as a domain in the configuration.
|
||||
domain = [newLogin substringFromIndex: (r.location + r.length)];
|
||||
if (![[sd domainIds] containsObject: domain])
|
||||
domain = nil;
|
||||
if ([[sd domainIds] containsObject: domain] &&
|
||||
![sd enableDomainBasedUID])
|
||||
newLogin = [newLogin substringToIndex: r.location];
|
||||
|
||||
if (domain != nil && ![sd enableDomainBasedUID])
|
||||
// Login domains are enabled (SOGoLoginDomains) but not
|
||||
|
||||
@@ -514,21 +514,9 @@ static Class NSNullK;
|
||||
|
||||
if (r.location != NSNotFound)
|
||||
{
|
||||
NSArray *allDomains;
|
||||
int i;
|
||||
|
||||
*_domain = [username substringFromIndex: r.location+1];
|
||||
|
||||
allDomains = [[dd dictionaryForKey: @"domains"] allValues];
|
||||
|
||||
for (i = 0; i < [allDomains count]; i++)
|
||||
{
|
||||
if ([*_domain isEqualToString: [[allDomains objectAtIndex: i] objectForKey: @"SOGoMailDomain"]])
|
||||
break;
|
||||
}
|
||||
|
||||
// We haven't found one
|
||||
if (i == [allDomains count])
|
||||
if (![[[SOGoSystemDefaults sharedSystemDefaults] domainIds] containsObject: *_domain])
|
||||
*_domain = nil;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user