Revert "(fix) more fixes and clarifications on the mutli-domain settings"

This reverts commit d07df554f3.
This commit is contained in:
Julio García
2015-06-02 12:24:32 +02:00
parent 617e6f6454
commit 3dd8bddc0e
3 changed files with 19 additions and 12 deletions
+2 -3
View File
@@ -165,9 +165,8 @@
// 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] &&
![sd enableDomainBasedUID])
newLogin = [newLogin substringToIndex: r.location];
if (![[sd domainIds] containsObject: domain])
domain = nil;
if (domain != nil && ![sd enableDomainBasedUID])
// Login domains are enabled (SOGoLoginDomains) but not
+13 -1
View File
@@ -514,9 +514,21 @@ static Class NSNullK;
if (r.location != NSNotFound)
{
NSArray *allDomains;
int i;
*_domain = [username substringFromIndex: r.location+1];
if (![[[SOGoSystemDefaults sharedSystemDefaults] domainIds] containsObject: *_domain])
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])
*_domain = nil;
}
}