Add domain to lookupContactEntry

This commit is contained in:
Jesús García Sáez authored and Carlos Pérez-Aradros Herce committed 2015-11-05 19:11:19 +01:00
1 parent 48832a4878
commit 7d49674d9d
6 files changed
+27 -17

No files matched your search

+13 -8
View File
@@ -164,9 +164,10 @@
ldifEntry = [childRecords objectForKey: objectName];
if (!ldifEntry)
{
ldifEntry = [source lookupContactEntry: objectName];
if (ldifEntry)
[childRecords setObject: ldifEntry forKey: objectName];
ldifEntry = [source lookupContactEntry: objectName
inDomain: [[context activeUser] domain]];
if (ldifEntry)
[childRecords setObject: ldifEntry forKey: objectName];
else if ([self isValidContentName: objectName])
{
url = [[[lookupContext request] uri] urlWithoutParameters];
@@ -324,10 +325,14 @@
NSDictionary *record;
if (aName && [aName length] > 0)
record = [self _flattenedRecord: [source lookupContactEntry: aName]];
{
record = [source lookupContactEntry: aName
inDomain: [[context activeUser] domain]];
record = [self _flattenedRecord: record];
}
else
record = nil;
return record;
}
@@ -562,7 +567,7 @@
toResponse: (WOResponse *) response
{
NSObject <DOMElement> *element;
NSString *url, *baseURL, *cname;
NSString *url, *baseURL, *cname, *domain;
NSString **propertiesArray;
NSMutableString *buffer;
NSDictionary *object;
@@ -579,13 +584,13 @@
max = [refs length];
buffer = [NSMutableString stringWithCapacity: max*512];
domain = [[context activeUser] domain];
for (count = 0; count < max; count++)
{
element = [refs objectAtIndex: count];
url = [[[element firstChild] nodeValue] stringByUnescapingURL];
cname = [self _deduceObjectNameFromURL: url fromBaseURL: baseURL];
object = [source lookupContactEntry: cname];
object = [source lookupContactEntry: cname inDomain: domain];
if (object)
[self appendObject: object
properties: propertiesArray
+1
View File
@@ -1242,6 +1242,7 @@ groupObjectClasses: (NSArray *) newGroupObjectClasses
}
- (NSDictionary *) lookupContactEntry: (NSString *) theID
inDomain: (NSString *) domain
{
NGLdapEntry *ldapEntry;
EOQualifier *qualifier;
+2 -1
View File
@@ -56,7 +56,8 @@
newPassword: (NSString *) newPassword
perr: (SOGoPasswordPolicyError *) perr;
- (NSDictionary *) lookupContactEntry: (NSString *) theID;
- (NSDictionary *) lookupContactEntry: (NSString *) theID
inDomain: (NSString *) domain;
- (NSDictionary *) lookupContactEntryWithUIDorEmail: (NSString *) entryID
inDomain: (NSString *) domain;
+1 -1
View File
@@ -1047,7 +1047,7 @@ static Class NSNullK;
while ((sourceID = [sources nextObject]))
{
currentSource = [_sources objectForKey: sourceID];
contact = [currentSource lookupContactEntry: uid];
contact = [currentSource lookupContactEntry: uid inDomain: domain];
if (contact)
[contacts addObject: contact];
}
+2 -1
View File
@@ -618,8 +618,9 @@
- (NSDictionary *) lookupContactEntry: (NSString *) theID
inDomain: (NSString *) domain
{
return [self _lookupContactEntry: theID considerEmail: NO inDomain: nil];
return [self _lookupContactEntry: theID considerEmail: NO inDomain: domain];
}
- (NSDictionary *) lookupContactEntryWithUIDorEmail: (NSString *) entryID