From 3f43e0b56e03255f35f0f918037f87f478730dbc Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 10 Jun 2010 18:45:35 +0000 Subject: [PATCH] Monotone-Parent: 18464c2d77d4979f1c50fac4f095dcf6dcb967c1 Monotone-Revision: 47be4cd66ca07d4558d608a37376c91af1d0b863 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-06-10T18:45:35 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 3 +++ SoObjects/SOGo/SOGoDAVAuthenticator.m | 31 +++++++++++---------------- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index a842fb3d3..ed55cf21c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2010-06-10 Wolfgang Sourdeau + * SoObjects/SOGo/SOGoDAVAuthenticator.m (-userInContext:): + reorganized method. + * SoObjects/SOGo/NSString+Utilities.m (-composeURLWithAction:parameters:andHash:): don't attempt to add parameters if the parameters argument is empty. diff --git a/SoObjects/SOGo/SOGoDAVAuthenticator.m b/SoObjects/SOGo/SOGoDAVAuthenticator.m index 34607f6fa..8887f87f2 100644 --- a/SoObjects/SOGo/SOGoDAVAuthenticator.m +++ b/SoObjects/SOGo/SOGoDAVAuthenticator.m @@ -97,28 +97,23 @@ { static SOGoUser *anonymous = nil; SOGoUser *user; - NSArray *traversalPath; NSString *login; - if (!anonymous) - anonymous - = [[SOGoUser alloc] initWithLogin: @"anonymous" - roles: [NSArray arrayWithObject: SoRole_Anonymous]]; - login = [self checkCredentialsInContext:_ctx]; - if (login) + if ([login isEqualToString: @"anonymous"]) { - if ([login isEqualToString: @"anonymous"]) - { - traversalPath = [_ctx objectForKey: @"SoRequestTraversalPath"]; - user = anonymous; - } - else - { - user = [SOGoUser userWithLogin: login - roles: [self rolesForLogin: login]]; - [user setCurrentPassword: [self passwordInContext: _ctx]]; - } + if (!anonymous) + anonymous + = [[SOGoUser alloc] + initWithLogin: @"anonymous" + roles: [NSArray arrayWithObject: SoRole_Anonymous]]; + user = anonymous; + } + else if ([login length]) + { + user = [SOGoUser userWithLogin: login + roles: [self rolesForLogin: login]]; + [user setCurrentPassword: [self passwordInContext: _ctx]]; } else user = nil;