Monotone-Parent: 326d1c3e09ab40b1884b684c1cfb0feca9ae3c0d

Monotone-Revision: b77c80d28969876aa496ff580015697daf5bbc94

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2006-08-14T20:35:11
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2006-08-14 20:35:11 +00:00
parent 7b4c1ac29d
commit b952c4e43a
3 changed files with 27 additions and 3 deletions

View File

@@ -1,5 +1,11 @@
2006-08-14 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* 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.

View File

@@ -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

View File

@@ -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];
}