mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-11-22 07:14:21 +00:00
1 parent
d181cc4d06
commit
3da633aebf
4 files changed
+90
-19
No files matched your search
@@ -1,6 +1,6 @@
|
||||
/* LDAPSource.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2007-2019 Inverse inc.
|
||||
* Copyright (C) 2007-2021 Inverse inc.
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -437,7 +437,7 @@ groupObjectClasses: (NSArray *) newGroupObjectClasses
|
||||
//
|
||||
//
|
||||
//
|
||||
- (NGLdapConnection *) _ldapConnection
|
||||
- (id) connection
|
||||
{
|
||||
NGLdapConnection *ldapConnection;
|
||||
NSString *value, *key;
|
||||
@@ -492,6 +492,11 @@ groupObjectClasses: (NSArray *) newGroupObjectClasses
|
||||
return ldapConnection;
|
||||
}
|
||||
|
||||
- (NGLdapConnection *) _ldapConnection
|
||||
{
|
||||
return (NGLdapConnection *)[self connection];
|
||||
}
|
||||
|
||||
- (NSString *) domain
|
||||
{
|
||||
return _domain;
|
||||
@@ -1317,11 +1322,12 @@ groupObjectClasses: (NSArray *) newGroupObjectClasses
|
||||
}
|
||||
|
||||
- (NGLdapEntry *) _lookupLDAPEntry: (EOQualifier *) theQualifier
|
||||
usingConnection: (id) connection
|
||||
{
|
||||
NGLdapConnection *ldapConnection;
|
||||
NSEnumerator *entries;
|
||||
|
||||
ldapConnection = [self _ldapConnection];
|
||||
ldapConnection = (NGLdapConnection *)connection;
|
||||
|
||||
if ([_scope caseInsensitiveCompare: @"BASE"] == NSOrderedSame)
|
||||
entries = [ldapConnection baseSearchAtBaseDN: _baseDN
|
||||
@@ -1339,8 +1345,15 @@ groupObjectClasses: (NSArray *) newGroupObjectClasses
|
||||
return [entries nextObject];
|
||||
}
|
||||
|
||||
- (NGLdapEntry *) _lookupLDAPEntry: (EOQualifier *) theQualifier
|
||||
{
|
||||
return [self _lookupLDAPEntry: theQualifier
|
||||
usingConnection: [self _ldapConnection]];
|
||||
}
|
||||
|
||||
- (NSDictionary *) lookupContactEntry: (NSString *) theID
|
||||
inDomain: (NSString *) theDomain
|
||||
usingConnection: (id) connection
|
||||
{
|
||||
NGLdapEntry *ldapEntry;
|
||||
EOQualifier *qualifier;
|
||||
@@ -1354,7 +1367,8 @@ groupObjectClasses: (NSArray *) newGroupObjectClasses
|
||||
s = [NSString stringWithFormat: @"(%@='%@')",
|
||||
_IDField, SafeLDAPCriteria(theID)];
|
||||
qualifier = [EOQualifier qualifierWithQualifierFormat: s];
|
||||
ldapEntry = [self _lookupLDAPEntry: qualifier];
|
||||
ldapEntry = [self _lookupLDAPEntry: qualifier
|
||||
usingConnection: connection];
|
||||
if (ldapEntry)
|
||||
ldifRecord = [self _convertLDAPEntryToContact: ldapEntry];
|
||||
}
|
||||
@@ -1362,6 +1376,14 @@ groupObjectClasses: (NSArray *) newGroupObjectClasses
|
||||
return ldifRecord;
|
||||
}
|
||||
|
||||
- (NSDictionary *) lookupContactEntry: (NSString *) theID
|
||||
inDomain: (NSString *) theDomain
|
||||
{
|
||||
return [self lookupContactEntry: theID
|
||||
inDomain: theDomain
|
||||
usingConnection: [self _ldapConnection]];
|
||||
}
|
||||
|
||||
- (NSDictionary *) lookupContactEntryWithUIDorEmail: (NSString *) uid
|
||||
inDomain: (NSString *) theDomain
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user