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:
commit
0a37652dd6
|
@ -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]))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue