mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-10 02:45:08 +00:00
Add domain to lookupGroupEntryByUID/ByEmail
This commit is contained in:
committed by
Carlos Pérez-Aradros Herce
parent
180269e39e
commit
48832a4878
@@ -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
|
||||
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user