Monotone-Parent: 783e348847b1713263dc1788ecc748a3b7c3bcfa

Monotone-Revision: 56d4fc5e8a975c626a7d96d0b6909e1e238818ea

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2008-07-28T20:29:24
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2008-07-28 20:29:24 +00:00
parent 2bdd4fe0ee
commit 16be267346
4 changed files with 32 additions and 4 deletions
+10
View File
@@ -1,3 +1,13 @@
2008-07-28 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/SOGo/SOGoUserFolder.m ([SOGoUserFolder
-foldersOfType:typematchingUID:uid]): make searches only in user
repositories and not in addressbooks.
* SoObjects/SOGo/LDAPUserManager.m ([LDAPUserManager
-fetchUsersMatching:filter]): new method allowing to make searches
only in user repositories.
2008-07-25 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/Scheduler/UIxCalMainView.m ([UIxCalMainView -dayStartHour]):
+1
View File
@@ -54,6 +54,7 @@
- (NSString *) displayNameForSourceWithID: (NSString *) sourceID;
- (NSDictionary *) contactInfosForUserWithUIDorEmail: (NSString *) uid;
- (NSArray *) fetchContactsMatching: (NSString *) match;
- (NSArray *) fetchUsersMatching: (NSString *) filter;
- (NSString *) getCNForUID: (NSString *) uid;
- (NSString *) getEmailForUID: (NSString *) uid;
+20 -3
View File
@@ -164,14 +164,12 @@ static BOOL forceImapLoginWithEmail = NO;
sourceIDs = [NSMutableArray array];
allIDs = [[sources allKeys] objectEnumerator];
currentID = [allIDs nextObject];
while (currentID)
while ((currentID = [allIDs nextObject]))
{
canAuthenticate = [[sourcesMetadata objectForKey: currentID]
objectForKey: sourceType];
if ([canAuthenticate boolValue])
[sourceIDs addObject: currentID];
currentID = [allIDs nextObject];
}
return sourceIDs;
@@ -516,6 +514,25 @@ static BOOL forceImapLoginWithEmail = NO;
return [self _compactAndCompleteContacts: [contacts objectEnumerator]];
}
- (NSArray *) fetchUsersMatching: (NSString *) filter
{
NSMutableArray *contacts;
NSEnumerator *ldapSources;
NSString *sourceID;
LDAPSource *currentSource;
contacts = [NSMutableArray array];
ldapSources = [[self authenticationSourceIDs] objectEnumerator];
while ((sourceID = [ldapSources nextObject]))
{
currentSource = [sources objectForKey: sourceID];
[contacts addObjectsFromArray:
[currentSource fetchContactsMatching: filter]];
}
return [self _compactAndCompleteContacts: [contacts objectEnumerator]];
}
- (void) cleanupSources
{
NSEnumerator *userIDs;
+1 -1
View File
@@ -194,7 +194,7 @@
results = [NSMutableDictionary dictionary];
contacts
= [[LDAPUserManager sharedUserManager] fetchContactsMatching: uid];
= [[LDAPUserManager sharedUserManager] fetchUsersMatching: uid];
enumerator = [contacts objectEnumerator];
while ((contact = [enumerator nextObject]))
{