Monotone-Parent: 3d920991e042a031e499189cfc46e35d8309ae68
Monotone-Revision: c3db91d7b98f4667ce24b3d38e6bd68d32909d57 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-07-23T19:04:54 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
27dc961e2e
commit
6434fc94a9
|
@ -1,3 +1,11 @@
|
|||
2007-07-23 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/SOGo/LDAPSource.m ([LDAPSource +initialize]): query
|
||||
the values for SOGoLDAPQueryLimit and SOGoLDAPQueryTimeout from
|
||||
the application settings. If set, both limit will influence the
|
||||
maximum size of the resultsets and the time taken to solve them.
|
||||
([LDAPSource -_initLDAPConnection]): initialize the limits.
|
||||
|
||||
2007-07-22 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/Contacts/SOGoContactGCSFolder.m ([SOGoContactGCSFolder -davNamespaces]): added new overriden
|
||||
|
|
|
@ -32,13 +32,21 @@
|
|||
#import "LDAPSource.h"
|
||||
|
||||
static NSArray *commonSearchFields;
|
||||
static int timeLimit;
|
||||
static int sizeLimit;
|
||||
|
||||
@implementation LDAPSource
|
||||
|
||||
+ (void) initialize
|
||||
{
|
||||
NSUserDefaults *ud;
|
||||
|
||||
if (!commonSearchFields)
|
||||
{
|
||||
ud = [NSUserDefaults standardUserDefaults];
|
||||
sizeLimit = [ud integerForKey: @"SOGoLDAPQueryLimit"];
|
||||
timeLimit = [ud integerForKey: @"SOGoLDAPQueryTimeout"];
|
||||
|
||||
commonSearchFields = [NSArray arrayWithObjects:
|
||||
@"title",
|
||||
@"company",
|
||||
|
@ -211,6 +219,10 @@ static NSArray *commonSearchFields;
|
|||
[ldapConnection bindWithMethod: @"simple"
|
||||
binddn: bindDN
|
||||
credentials: password];
|
||||
if (sizeLimit > 0)
|
||||
[ldapConnection setQuerySizeLimit: sizeLimit];
|
||||
if (timeLimit > 0)
|
||||
[ldapConnection setQueryTimeLimit: timeLimit];
|
||||
}
|
||||
|
||||
/* user management */
|
||||
|
@ -264,6 +276,8 @@ static NSArray *commonSearchFields;
|
|||
{
|
||||
bindConnection = [[NGLdapConnection alloc] initWithHostName: hostname
|
||||
port: port];
|
||||
if (timeLimit > 0)
|
||||
[ldapConnection setQueryTimeLimit: timeLimit];
|
||||
if (bindFields)
|
||||
userDN = [self _fetchUserDNForLogin: loginToCheck];
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue