From 86f278fd77c2ac5b4d67b606bdadd6a1db3149ad Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Sun, 20 Nov 2011 15:44:56 +0000 Subject: [PATCH] Monotone-Parent: 1d22ee7adc99b9420d9a7b859dfb1048c8c92eaa Monotone-Revision: ad417bdf1bec487a4e724865914dd8c70bb16db5 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-11-20T15:44:56 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 7 +++++++ OpenChange/MAPIStoreContext.m | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index ec36a0173..109ef9736 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-11-20 Wolfgang Sourdeau + + * OpenChange/MAPIStoreContext.m + (-initFromURL:withConnectionInfo:andTDBIndexing:): instantiate a + SOGoUser corresponding to the username of the new context and + associated it to the woContext ivar. + 2011-11-18 Wolfgang Sourdeau * OpenChange/MAPIStoreFolder.m (-permissionEntries): new public diff --git a/OpenChange/MAPIStoreContext.m b/OpenChange/MAPIStoreContext.m index ec431228c..997eafc07 100644 --- a/OpenChange/MAPIStoreContext.m +++ b/OpenChange/MAPIStoreContext.m @@ -208,11 +208,17 @@ _prepareContextClass (Class contextClass, andTDBIndexing: (struct tdb_wrap *) indexingTdb { NSString *username; + SOGoUser *activeUser; if ((self = [self init])) { ASSIGN (contextUrl, newUrl); username = [NSString stringWithUTF8String: newConnInfo->username]; + activeUser = [SOGoUser userWithLogin: username]; + if (!activeUser) + [self errorWithFormat: @"user '%@' not found in SOGo environment", + username]; + [woContext setActiveUser: activeUser]; ASSIGN (mapping, [MAPIStoreMapping mappingForUsername: username withIndexing: indexingTdb]); [mapping increaseUseCount];