Add domain to lookupGroupEntryByUID/ByEmail

This commit is contained in:
Jesús García Sáez
2015-09-23 14:51:46 +02:00
committed by Carlos Pérez-Aradros Herce
parent 180269e39e
commit 48832a4878
3 changed files with 11 additions and 7 deletions
+4 -2
View File
@@ -120,8 +120,10 @@ andMultipleBookingsField: (NSString *) newMultipleBookingsField;
- (void) setContactMapping: (NSDictionary *) newMapping
andObjectClasses: (NSArray *) newObjectClasses;
- (NGLdapEntry *) lookupGroupEntryByUID: (NSString *) theUID;
- (NGLdapEntry *) lookupGroupEntryByEmail: (NSString *) theEmail;
- (NGLdapEntry *) lookupGroupEntryByUID: (NSString *) theUID
inDomain: (NSString *) domain;
- (NGLdapEntry *) lookupGroupEntryByEmail: (NSString *) theEmail
inDomain: (NSString *) domain;
@end
+2
View File
@@ -1339,12 +1339,14 @@ groupObjectClasses: (NSArray *) newGroupObjectClasses
}
- (NGLdapEntry *) lookupGroupEntryByUID: (NSString *) theUID
inDomain: (NSString *) domain
{
return [self _lookupGroupEntryByAttributes: [NSArray arrayWithObject: UIDField]
andValue: theUID];
}
- (NGLdapEntry *) lookupGroupEntryByEmail: (NSString *) theEmail
inDomain: (NSString *) domain
{
return [self _lookupGroupEntryByAttributes: mailFields
andValue: theEmail];
+5 -5
View File
@@ -113,7 +113,7 @@
uid = [theID hasPrefix: @"@"] ? [theID substringFromIndex: 1] : theID;
return [SOGoGroup groupWithValue: uid
andSourceSelector: @selector (lookupGroupEntryByUID:)
andSourceSelector: @selector (lookupGroupEntryByUID:inDomain:)
inDomain: domain];
}
@@ -121,7 +121,7 @@
inDomain: (NSString *) domain
{
return [SOGoGroup groupWithValue: theEmail
andSourceSelector: @selector (lookupGroupEntryByEmail:)
andSourceSelector: @selector (lookupGroupEntryByEmail:inDomain:)
inDomain: domain];
}
@@ -158,9 +158,9 @@
// Our different sources might not all implements groups support
if ([source respondsToSelector: theSelector])
entry = [source performSelector: theSelector
withObject: theValue];
entry = [source performSelector: theSelector
withObject: theValue
withObject: domain];
if (entry)
break;