Monotone-Parent: 4649d6842fe70a3e582c138faf9776802809704a

Monotone-Revision: 7df1edc5e4fb86c8fe01354ff89b73239e5a4e37

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2009-11-29T21:44:04
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2009-11-29 21:44:04 +00:00
parent 12b8c7a427
commit 43dfb25589
3 changed files with 12 additions and 52 deletions
+6
View File
@@ -1,3 +1,9 @@
2009-11-29 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/SOGo/LDAPSource.m (-initFromUDSource:inDomain):
removed handing of "domain attribute", since the underlying
mechanism causes complex code for an unrealistic case.
2009-11-28 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/SOGo/SOGoUserSettings.m: new class module designed to
+5 -30
View File
@@ -180,13 +180,13 @@ static NSArray *commonSearchFields;
[modulesConstraints release];
[_scope release];
[searchAttributes release];
[domain release];
[super dealloc];
}
- (id) initFromUDSource: (NSDictionary *) udSource
inDomain: (NSString *) sourceDomain
{
NSString *udDomainAttribute;
SOGoDomainDefaults *dd;
NSNumber *udQueryLimit, *udQueryTimeout;
@@ -207,28 +207,13 @@ static NSArray *commonSearchFields;
IMAPHostField: [udSource objectForKey: @"IMAPHostFieldName"]
andBindFields: [udSource objectForKey: @"bindFields"]];
udDomainAttribute = [udSource objectForKey: @"domainAttribute"];
if ([sourceDomain length])
{
if ([udDomainAttribute length])
{
[self errorWithFormat: @"cannot define 'domainAttribute'"
@" for a domain-based source (%@)", sourceID];
[self release];
self = nil;
}
else
{
dd = [SOGoDomainDefaults defaultsForDomain: sourceDomain];
ASSIGN (domain, sourceDomain);
}
dd = [SOGoDomainDefaults defaultsForDomain: sourceDomain];
ASSIGN (domain, sourceDomain);
}
else
{
if ([udDomainAttribute length])
ASSIGN (domainAttribute, udDomainAttribute);
dd = [SOGoSystemDefaults sharedSystemDefaults];
}
dd = [SOGoSystemDefaults sharedSystemDefaults];
contactInfoAttribute
= [udSource objectForKey: @"SOGoLDAPContactInfoAttribute"];
@@ -541,9 +526,6 @@ static NSArray *commonSearchFields;
if ([contactInfoAttribute length])
[searchAttributes addObjectUniquely: contactInfoAttribute];
if ([domainAttribute length])
[searchAttributes addObjectUniquely: domainAttribute];
// Add IMAP hostname from user defaults
if ([IMAPHostField length])
[searchAttributes addObjectUniquely: IMAPHostField];
@@ -732,14 +714,7 @@ static NSArray *commonSearchFields;
value = @"";
[contactEntry setObject: value forKey: @"c_info"];
if (domainAttribute)
{
value = [[ldapEntry attributeWithName: domainAttribute]
stringValueAtIndex: 0];
if (!value)
value = @"";
}
else if (domain)
if (domain)
value = domain;
else
value = @"";
+1 -22
View File
@@ -100,8 +100,6 @@
- (id) initFromUDSource: (NSDictionary *) udSource
inDomain: (NSString *) sourceDomain
{
NSString *udDomainAttribute;
self = [self init];
ASSIGN(_sourceID, [udSource objectForKey: @"id"]);
@@ -115,27 +113,8 @@
_viewURL = [[NSURL alloc] initWithString: [udSource objectForKey: @"viewURL"]];
#warning this domain code has no effect yet
/* FIXME: the queries below do not setup c_domain. */
udDomainAttribute = [udSource objectForKey: @"domainAttribute"];
if ([sourceDomain length])
{
if ([udDomainAttribute length])
{
[self errorWithFormat: @"cannot define 'domainAttribute'"
@" for a domain-based source (%@)", _sourceID];
[self autorelease];
return nil;
}
else
{
ASSIGN (_domain, sourceDomain);
}
}
else
{
if ([udDomainAttribute length])
ASSIGN (_domainAttribute, udDomainAttribute);
}
ASSIGN (_domain, sourceDomain);
if (!_viewURL)
{