mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-11 03:15:10 +00:00
Added support for the parameter "IMAPLoginMailField" for SQL/LDAP sources, and the parameter "authenticationFilter" for SQL sources. See ChangeLog.
Monotone-Parent: 1cdaff22cdbdb961e1937dc8f1ac1936bd06dc99 Monotone-Revision: 36439821e42cfcb830bfff9081d7e1318f1e92ab Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2011-04-14T18:41:10 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -337,17 +337,23 @@
|
||||
- (NSString *) getImapLoginForUID: (NSString *) uid
|
||||
{
|
||||
NSDictionary *contactInfos;
|
||||
NSString *domain;
|
||||
NSString *domain, *login;
|
||||
SOGoDomainDefaults *dd;
|
||||
|
||||
contactInfos = [self contactInfosForUserWithUIDorEmail: uid];
|
||||
login = [contactInfos objectForKey: @"c_imaplogin"];
|
||||
domain = [contactInfos objectForKey: @"c_domain"];
|
||||
if ([domain length])
|
||||
dd = [SOGoDomainDefaults defaultsForDomain: domain];
|
||||
else
|
||||
dd = [SOGoSystemDefaults sharedSystemDefaults];
|
||||
|
||||
return ([dd forceIMAPLoginWithEmail] ? [self getEmailForUID: uid] : uid);
|
||||
if (login == nil)
|
||||
{
|
||||
if ([domain length])
|
||||
dd = [SOGoDomainDefaults defaultsForDomain: domain];
|
||||
else
|
||||
dd = [SOGoSystemDefaults sharedSystemDefaults];
|
||||
|
||||
login = [dd forceIMAPLoginWithEmail] ? [self getEmailForUID: uid] : uid;
|
||||
}
|
||||
|
||||
return login;
|
||||
}
|
||||
|
||||
- (NSString *) getUIDForEmail: (NSString *) email
|
||||
@@ -549,7 +555,7 @@
|
||||
NSDictionary *userEntry;
|
||||
NSEnumerator *sogoSources;
|
||||
NSObject <SOGoDNSource> *currentSource;
|
||||
NSString *sourceID, *cn, *c_domain, *c_uid, *c_imaphostname;
|
||||
NSString *sourceID, *cn, *c_domain, *c_uid, *c_imaphostname, *c_imaplogin;
|
||||
NSArray *c_emails;
|
||||
BOOL access;
|
||||
|
||||
@@ -558,6 +564,7 @@
|
||||
c_uid = nil;
|
||||
c_domain = nil;
|
||||
c_imaphostname = nil;
|
||||
c_imaplogin = nil;
|
||||
|
||||
[currentUser setObject: [NSNumber numberWithBool: YES]
|
||||
forKey: @"CalendarAccess"];
|
||||
@@ -583,6 +590,8 @@
|
||||
[emails addObjectsFromArray: c_emails];
|
||||
if (!c_imaphostname)
|
||||
c_imaphostname = [userEntry objectForKey: @"c_imaphostname"];
|
||||
if (!c_imaplogin)
|
||||
c_imaplogin = [userEntry objectForKey: @"c_imaplogin"];
|
||||
access = [[userEntry objectForKey: @"CalendarAccess"] boolValue];
|
||||
if (!access)
|
||||
[currentUser setObject: [NSNumber numberWithBool: NO]
|
||||
@@ -603,6 +612,8 @@
|
||||
|
||||
if (c_imaphostname)
|
||||
[currentUser setObject: c_imaphostname forKey: @"c_imaphostname"];
|
||||
if (c_imaplogin)
|
||||
[currentUser setObject: c_imaplogin forKey: @"c_imaplogin"];
|
||||
[currentUser setObject: emails forKey: @"emails"];
|
||||
[currentUser setObject: cn forKey: @"cn"];
|
||||
[currentUser setObject: c_uid forKey: @"c_uid"];
|
||||
|
||||
Reference in New Issue
Block a user