See ChangeLog.

Monotone-Parent: 468e7e6366c0f335fea6ffbfbc6ecf9ab41aaa77
Monotone-Revision: c241a8e1e716fa0db3e4f4e370c051096cc2c3e2

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2012-01-12T20:52:14
This commit is contained in:
Francis Lachapelle
2012-01-12 20:52:14 +00:00
parent e5d9676c06
commit 84909dd628
3 changed files with 36 additions and 1 deletions

View File

@@ -23,6 +23,13 @@
limited perform a SOAP request to a MS Exhange server to retrieve
the freebusy information of a user.
* UI/Scheduler/UIxComponentEditor.m (-_loadAttendees): when the
attendee's email address doesn't match a user from the
authentication source(s), perform a lookup in the addressbook
source(s). If the email matches a user from a source with a
MSExchangeHostname, return a concatenation of the active user uid
and this contact uid.
* UI/WebServerResources/UIxAttendeesEditor.js
(performSearchCallback): if a matching contact has the
"isMSExchange" attribute, prefix the uid with the login uid.

View File

@@ -24,6 +24,7 @@
#import <Foundation/NSDictionary.h>
#import <Foundation/NSEnumerator.h>
#import <Foundation/NSString.h>
#import <Foundation/NSValue.h>
#import <NGObjWeb/NSException+HTTP.h>
#import <NGObjWeb/WOApplication.h>
@@ -160,6 +161,7 @@
{
NSMutableDictionary *newRecord;
NSString *data;
NSObject <SOGoSource> *recordSource;
newRecord = [NSMutableDictionary dictionaryWithCapacity: 8];
[newRecord setObject: [oldRecord objectForKey: @"c_uid"]
@@ -218,6 +220,11 @@
if ([data length] > 0)
[newRecord setObject: data forKey: @"contactInfo"];
recordSource = [oldRecord objectForKey: @"source"];
if ([recordSource conformsToProtocol: @protocol (SOGoDNSource)] &&
[[(NSObject <SOGoDNSource>*) recordSource MSExchangeHostname] length])
[newRecord setObject: [NSNumber numberWithInt: 1] forKey: @"isMSExchange"];
return newRecord;
}

View File

@@ -61,6 +61,7 @@
#import <SOGo/SOGoUser.h>
#import <SOGo/SOGoUserDefaults.h>
#import <SOGo/SOGoUserManager.h>
#import <SOGo/SOGoSource.h>
#import <SOGo/SOGoPermissions.h>
#import <SOGo/SOGoSystemDefaults.h>
#import <SOGo/WOResourceManager+SOGo.h>
@@ -248,9 +249,12 @@ iRANGE(2);
{
NSEnumerator *attendees;
NSMutableDictionary *currentAttendeeData;
NSString *uid, *domain;
NSArray *contacts;
NSDictionary *contact;
iCalPerson *currentAttendee;
NSString *uid;
SOGoUserManager *um;
NSObject <SOGoSource> *source;
jsonAttendees = [NSMutableDictionary new];
um = [SOGoUserManager sharedUserManager];
@@ -271,6 +275,23 @@ iRANGE(2);
if (uid != nil)
[currentAttendeeData setObject: uid
forKey: @"uid"];
else
{
domain = [[context activeUser] domain];
contacts = [um fetchContactsMatching: [currentAttendee rfc822Email] inDomain: domain];
if ([contacts count] == 1)
{
contact = [contacts lastObject];
source = [contact objectForKey: @"source"];
if ([source conformsToProtocol: @protocol (SOGoDNSource)] &&
[[(NSObject <SOGoDNSource>*) source MSExchangeHostname] length])
{
uid = [NSString stringWithFormat: @"%@:%@", [[context activeUser] login],
[contact valueForKey: @"c_uid"]];
[currentAttendeeData setObject: uid forKey: @"uid"];
}
}
}
[currentAttendeeData setObject: [[currentAttendee partStat] lowercaseString]
forKey: @"partstat"];