See ChangeLog

Monotone-Parent: 6447c0cddc2aaf8251e73cdfed175eed08cf5bac
Monotone-Revision: 32e14dc57c4f6d9a43de5dfdf3c298091cbf84ea

Monotone-Author: ludovic@Sophos.ca
Monotone-Date: 2010-01-08T17:48:45
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Ludovic Marcotte
2010-01-08 17:48:45 +00:00
parent f8a2a82673
commit b11895fd59
4 changed files with 34 additions and 7 deletions

View File

@@ -1,3 +1,10 @@
2010-01-08 Ludovic Marcotte <lmarcotte@inverse.ca>
* SoObjects/SOGo/LDAPSource.{h,m} - bindFields is now
an array instead of a list of strings separated by commas.
Updated the Installation & Configuration Guide to reflect
this change.
2010-01-08 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UnitTests/SOGoTestRunner.m: separated class "SOGoTestRunner"

View File

@@ -52,7 +52,7 @@
NSString *UIDField;
NSArray *mailFields;
NSString *IMAPHostField;
NSString *bindFields;
NSArray *bindFields;
NSString *domain;
NSString *contactInfoAttribute;
@@ -74,7 +74,7 @@
UIDField: (NSString *) newUIDField
mailFields: (NSArray *) newMailFields
IMAPHostField: (NSString *) newIMAPHostField
andBindFields: (NSString *) newBindFields;
andBindFields: (id) newBindFields;
- (NGLdapEntry *) lookupGroupEntryByUID: (NSString *) theUID;
- (NGLdapEntry *) lookupGroupEntryByEmail: (NSString *) theEmail;

View File

@@ -266,7 +266,7 @@ static NSArray *commonSearchFields;
UIDField: (NSString *) newUIDField
mailFields: (NSArray *) newMailFields
IMAPHostField: (NSString *) newIMAPHostField
andBindFields: (NSString *) newBindFields
andBindFields: (id) newBindFields
{
ASSIGN (baseDN, [newBaseDN lowercaseString]);
if (newIDField)
@@ -280,7 +280,28 @@ static NSArray *commonSearchFields;
if (newMailFields)
ASSIGN (mailFields, newMailFields);
if (newBindFields)
ASSIGN (bindFields, newBindFields);
{
// Before SOGo v1.2.0, bindFields was a comma-separated list
// of values. So it could be configured as:
//
// bindFields = foo;
// bindFields = "foo, bar, baz";
//
// SOGo v1.2.0 and upwards redefined that parameter as an array
// so we would have instead:
//
// bindFields = (foo);
// bindFields = (foo, bar, baz);
//
// We check for the old format and we support it.
if ([newBindFields isKindOfClass: [NSArray class]])
ASSIGN(bindFields, newBindFields);
else
{
[self logWithFormat: @"WARNING: using old bindFields format - please update it"];
ASSIGN(bindFields, [newBindFields componentsSeparatedByString: @","]);
}
}
}
- (BOOL) _setupEncryption: (NGLdapConnection *) encryptedConn
@@ -351,7 +372,7 @@ static NSArray *commonSearchFields;
escapedUid = SafeLDAPCriteria (uid);
fields = [[bindFields componentsSeparatedByString: @","] objectEnumerator];
fields = [bindFields objectEnumerator];
while ((currentField = [fields nextObject]))
[qs appendFormat: @" OR (%@='%@')", currentField, escapedUid];
@@ -482,8 +503,7 @@ static NSArray *commonSearchFields;
UIDField, escapedUid, mailFormat];
if (bindFields)
{
bindFieldsEnum = [[bindFields componentsSeparatedByString: @","]
objectEnumerator];
bindFieldsEnum = [bindFields objectEnumerator];
while ((currentField = [bindFieldsEnum nextObject]))
[qs appendFormat: @" OR (%@='%@')", [currentField stringByTrimmingSpaces], escapedUid];
}