diff --git a/ChangeLog b/ChangeLog index 82939a78e..e87a5f49e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2006-08-14 Wolfgang Sourdeau + * SoObjects/Contacts/SOGoContactLDAPFolder.m + ([SOGoContactLDAPFolder + -LDAPSetHostname:setPort:setBindDN:setBindPW:setContactIdentifier: + setUserIdentifier:setRootDN:]): an LDAP field specifying the + loginname of the users can now be specified. + * UI/WebServerResources/generic.js: added code to manage contact lists through the new implementation of the UIxContactSelector. diff --git a/SoObjects/Contacts/SOGoContactLDAPFolder.h b/SoObjects/Contacts/SOGoContactLDAPFolder.h index ff29ea1af..88a89063f 100644 --- a/SoObjects/Contacts/SOGoContactLDAPFolder.h +++ b/SoObjects/Contacts/SOGoContactLDAPFolder.h @@ -33,6 +33,7 @@ { NGLdapConnection *connection; NSString *contactIdentifier; + NSString *userIdentifier; NSString *rootDN; NSString *displayName; NSMutableDictionary *entries; @@ -48,6 +49,7 @@ setBindDN: (NSString *) aBindDN setBindPW: (NSString *) aBindPW setContactIdentifier: (NSString *) aCI + setUserIdentifier: (NSString *) aUI setRootDN: (NSString *) aRootDN; @end diff --git a/SoObjects/Contacts/SOGoContactLDAPFolder.m b/SoObjects/Contacts/SOGoContactLDAPFolder.m index cf2e0169e..966576381 100644 --- a/SoObjects/Contacts/SOGoContactLDAPFolder.m +++ b/SoObjects/Contacts/SOGoContactLDAPFolder.m @@ -42,6 +42,13 @@ #import "SOGoContactLDAPEntry.h" #import "SOGoContactLDAPFolder.h" +#define folderListingFields [NSArray arrayWithObjects: @"c_name", @"cn", \ + @"sn", @"givenname", @"l", \ + @"mail", @"telephonenumber", \ + @"mailNickname", \ + @"sAMAccountName", \ + nil] + @class WOContext; @implementation SOGoContactLDAPFolder @@ -66,6 +73,7 @@ { connection = nil; contactIdentifier = nil; + userIdentifier = nil; rootDN = nil; entries = nil; } @@ -94,6 +102,8 @@ } if (contactIdentifier) [contactIdentifier release]; + if (userIdentifier) + [userIdentifier release]; if (rootDN) [rootDN release]; if (entries) @@ -120,6 +130,7 @@ setBindDN: (NSString *) aBindDN setBindPW: (NSString *) aBindPW setContactIdentifier: (NSString *) aCI + setUserIdentifier: (NSString *) aUI setRootDN: (NSString *) aRootDN; { connection = [[NGLdapConnection alloc] initWithHostName: aHostname @@ -134,6 +145,9 @@ if (contactIdentifier) [contactIdentifier release]; contactIdentifier = [aCI copy]; + if (userIdentifier) + [userIdentifier release]; + userIdentifier = [aUI copy]; } - (NGLdapConnection *) LDAPconnection @@ -149,7 +163,9 @@ - (NSArray *) _searchAttributes { return [NSArray arrayWithObjects: - @"title", + contactIdentifier, + userIdentifier, + @"title", @"company", @"o", @"modifytimestamp", @@ -191,7 +207,6 @@ @"postOfficeBox", @"homePhone", @"cn", - contactIdentifier, @"commonname", @"givenName", @"mozillaHomePostalCode", @@ -354,7 +369,8 @@ while (entry) { [records addObject: [entry asDictionaryWithAttributeNames: nil - andCName: @"cn"]]; + withUID: userIdentifier + andCName: contactIdentifier]]; entry = [contacts nextObject]; }