mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-17 22:24:54 +00:00
(fix) fixed addressbrook-only source entires having a c_uid set
This commit is contained in:
@@ -47,6 +47,7 @@
|
||||
#import <SOGo/NSObject+DAV.h>
|
||||
#import <SOGo/SOGoPermissions.h>
|
||||
#import <SOGo/SOGoSource.h>
|
||||
#import <SOGo/SOGoUserManager.h>
|
||||
#import <SOGo/SOGoUserSettings.h>
|
||||
#import <SOGo/SOGoSystemDefaults.h>
|
||||
#import <SOGo/WORequest+SOGo.h>
|
||||
@@ -225,8 +226,16 @@
|
||||
NSObject <SOGoSource> *recordSource;
|
||||
|
||||
newRecord = [NSMutableDictionary dictionaryWithCapacity: 8];
|
||||
[newRecord setObject: [oldRecord objectForKey: @"c_uid"]
|
||||
forKey: @"c_uid"];
|
||||
|
||||
// We set the c_uid only for authentication sources. SOGoUserSources set
|
||||
// with canAuthenticate = NO and isAddressBook = YES have absolutely *NO REASON*
|
||||
// to have entries with a c_uid. These can collide with real uids.
|
||||
if ([[[[SOGoUserManager sharedUserManager] metadataForSourceID: [source sourceID]] objectForKey: @"canAuthenticate"] boolValue])
|
||||
{
|
||||
[newRecord setObject: [oldRecord objectForKey: @"c_uid"]
|
||||
forKey: @"c_uid"];
|
||||
}
|
||||
|
||||
[newRecord setObject: [oldRecord objectForKey: @"c_name"]
|
||||
forKey: @"c_name"];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user