See ChangeLog
Monotone-Parent: 8869c98a60f05c3bea1afbb13e7e0be7c12effce Monotone-Revision: 0936c5d1f59eb93c7a73019f0fd42e4e7005e1d9 Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2009-08-10T16:23:21 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
34ee31b2cb
commit
a91abae53c
|
@ -1,3 +1,9 @@
|
|||
2009-08-10 Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
|
||||
* SoObjects/SOGo/LDAPUserManager.m
|
||||
Fixed an issue where the LDAP entries wouldn't be
|
||||
cached properly in memcached.
|
||||
|
||||
2009-08-10 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* Tests/webdavlib.py (WebDAVClient._prepare_headers): fixed a typo
|
||||
|
|
|
@ -308,9 +308,14 @@ static NSLock *lock = nil;
|
|||
if (!currentUser)
|
||||
{
|
||||
currentUser = [NSMutableDictionary dictionary];
|
||||
[[SOGoCache sharedCache] cacheValues: currentUser ofType: @"attributes" forLogin: login];
|
||||
}
|
||||
|
||||
// It's important to cache the password here as we might have cached the user's entry
|
||||
// in -contactInfosForUserWithUIDorEmail: and if we don't set the password and recache the
|
||||
// entry, the password would never be cached for the user unless its entry expires from
|
||||
// memcached's internal cache.
|
||||
[currentUser setObject: password forKey: @"password"];
|
||||
[[SOGoCache sharedCache] cacheValues: currentUser ofType: @"attributes" forLogin: login];
|
||||
}
|
||||
else
|
||||
checkOK = NO;
|
||||
|
@ -448,10 +453,15 @@ static NSLock *lock = nil;
|
|||
if (!([currentUser objectForKey: @"emails"]
|
||||
&& [currentUser objectForKey: @"cn"]))
|
||||
{
|
||||
if (!currentUser)
|
||||
// We make sure that we either have no occurence of a cache entry or that
|
||||
// we have an occurence with only a cached password. In the latter case, we
|
||||
// update the entry with the remaining information and recache the value.
|
||||
if (!currentUser || ([currentUser count] == 1 && [currentUser objectForKey: @"password"]))
|
||||
{
|
||||
newUser = YES;
|
||||
currentUser = [NSMutableDictionary dictionary];
|
||||
|
||||
if (!currentUser)
|
||||
currentUser = [NSMutableDictionary dictionary];
|
||||
}
|
||||
else
|
||||
newUser = NO;
|
||||
|
|
Loading…
Reference in New Issue