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;