Fix freebusy for multidomain environments

When returning contacts we have to supply also the domain field.
Because in a multidomain environment UIDField is unique only in
the domain so an user must be identified as uid@domain.

So when creating http requests from client side, we have to use
uid@domain instead of only uid so the SOGoUser created on server
side when parsing the requests is created properly.
This commit is contained in:
Jesús García Sáez
2015-09-24 18:56:07 +02:00
parent bea2415fad
commit 0ca6e7c6d3
2 changed files with 20 additions and 7 deletions
@@ -48,6 +48,7 @@
#import <SOGo/SOGoPermissions.h>
#import <SOGo/SOGoSource.h>
#import <SOGo/SOGoUserSettings.h>
#import <SOGo/SOGoSystemDefaults.h>
#import <SOGo/WORequest+SOGo.h>
#import <SOGo/WOResponse+SOGo.h>
@@ -236,6 +237,13 @@
data = @"";
[newRecord setObject: data forKey: @"c_cn"];
if ([[SOGoSystemDefaults sharedSystemDefaults] enableDomainBasedUID])
{
data = [oldRecord objectForKey: @"c_domain"];
if (data)
[newRecord setObject: data forKey: @"c_domain"];
}
data = [oldRecord objectForKey: @"mail"];
if (!data)
data = @"";