mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-01 21:26:24 +00:00
Merge pull request #139 from Zentyal/jgarcia/get-sources-from-your-domain
Try to authenticate only against sources of the given domain
This commit is contained in:
@@ -425,9 +425,19 @@ static Class NSNullK;
|
||||
NSEnumerator *authIDs;
|
||||
NSString *currentID;
|
||||
BOOL checkOK;
|
||||
|
||||
SOGoSystemDefaults *sd;
|
||||
NSRange r;
|
||||
|
||||
checkOK = NO;
|
||||
|
||||
|
||||
if (*domain == nil)
|
||||
{
|
||||
sd = [SOGoSystemDefaults sharedSystemDefaults];
|
||||
r = [login rangeOfString: @"@" options: NSBackwardsSearch];
|
||||
if ([sd enableDomainBasedUID] && r.location != NSNotFound)
|
||||
*domain = [login substringFromIndex: (r.location + r.length)];
|
||||
}
|
||||
|
||||
authIDs = [[self authenticationSourceIDsInDomain: *domain] objectEnumerator];
|
||||
while (!checkOK && (currentID = [authIDs nextObject]))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user