From 972aa027d9c7104ad449db7907ea4963d00d286d Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 19 Nov 2009 16:51:02 +0000 Subject: [PATCH] Monotone-Parent: 8714a90171f0256424d65122b72c98a61ef5f55a Monotone-Revision: 72e1b73ecd70270e80d3a060fabe219cfcdd21cd Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-11-19T16:51:02 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 4 ++++ Tools/sogo-tool.m | 20 +++++++++++++++----- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 74ac63bcb..57edff873 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2009-11-19 Wolfgang Sourdeau + * Tools/sogo-tool.m (main): we now check that the SOGo + configuration is valid and consequently that the tool runs under + the same account as SOGo. + * UI/Scheduler/UIxComponentEditor.m (-_handleAttendeeData): make direct use of the JSON constructor of NSDictionary rather than instantiating an NSScanner. This simplifies the code. diff --git a/Tools/sogo-tool.m b/Tools/sogo-tool.m index 001ea8186..762a0c934 100644 --- a/Tools/sogo-tool.m +++ b/Tools/sogo-tool.m @@ -229,12 +229,22 @@ main (int argc, char **argv, char **env) ud = [NSUserDefaults standardUserDefaults]; [ud addSuiteNamed: @"sogod"]; - dispatcher = [SOGoToolDispatcher new]; - if ([dispatcher run]) - rc = 0; + if ([ud objectForKey: @"SOGoLDAPSources"]) + { + dispatcher = [SOGoToolDispatcher new]; + if ([dispatcher run]) + rc = 0; + else + rc = -1; + [dispatcher release]; + } else - rc = -1; - [dispatcher release]; + { + NSLog (@"No LDAP source is configured in the SOGo configuration of this" + @" account. Please make sure to use this tool under the same" + @" username as SOGo."); + rc = -1; + } [pool release];