Added isDomainDefined

To check whether a domain is supported by our defined sources
This commit is contained in:
Jesús García Sáez
2015-11-05 19:11:19 +01:00
committed by Carlos Pérez-Aradros Herce
parent 9d3f3c619d
commit bf4a581d0f
4 changed files with 34 additions and 3 deletions
+2 -1
View File
@@ -41,6 +41,7 @@
#include <unistd.h>
#import "SOGoSystemDefaults.h"
#import "SOGoUserManager.h"
@implementation SOGoSession
@@ -262,7 +263,7 @@
// The domain is probably appended to the username;
// make sure it is defined as a domain in the configuration.
*theDomain = [*theLogin substringFromIndex: (r.location + r.length)];
if (![[sd domainIds] containsObject: *theDomain])
if (![[SOGoUserManager sharedUserManager] isDomainDefined: *theDomain])
*theDomain = nil;
}
}