From 6a9c0a46f23e0dde986048799fa9e107f704e05a Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 27 Jan 2010 15:48:13 +0000 Subject: [PATCH] reindentation Monotone-Parent: 7d47465e08002ccdb1fd666a02bb7acc70d38c1d Monotone-Revision: 8700a58737ff7392bcc35403e222b4e7d5fac676 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-01-27T15:48:13 Monotone-Branch: ca.inverse.sogo --- SoObjects/SOGo/SOGoWebAuthenticator.m | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/SoObjects/SOGo/SOGoWebAuthenticator.m b/SoObjects/SOGo/SOGoWebAuthenticator.m index f18417ee0..f31f7635b 100644 --- a/SoObjects/SOGo/SOGoWebAuthenticator.m +++ b/SoObjects/SOGo/SOGoWebAuthenticator.m @@ -34,7 +34,7 @@ #import #import -#import +#import #import "SOGoUserManager.h" #import "SOGoPermissions.h" @@ -66,14 +66,15 @@ static SOGoUser *anonymous = nil; SOGoUser *user; - if (!anonymous) - anonymous - = [[SOGoUser alloc] initWithLogin: @"anonymous" - roles: [NSArray arrayWithObject: SoRole_Anonymous]]; - user = (SOGoUser *) [super userInContext: _ctx]; if (!user) - user = anonymous; + { + if (!anonymous) + anonymous = [[SOGoUser alloc] + initWithLogin: @"anonymous" + roles: [NSArray arrayWithObject: SoRole_Anonymous]]; + user = anonymous; + } return user; } @@ -83,8 +84,8 @@ NSArray *creds; NSString *auth, *password; - auth = [[context request] cookieValueForKey: - [self cookieNameInContext: context]]; + auth = [[context request] + cookieValueForKey: [self cookieNameInContext: context]]; creds = [self parseCredentials: auth]; if ([creds count] > 1) password = [creds objectAtIndex: 1]; @@ -118,7 +119,7 @@ if ([auth isEqualToString: @"discard"]) { [context setObject: [NSArray arrayWithObject: SoRole_Anonymous] - forKey: @"SoAuthenticatedRoles"]; + forKey: @"SoAuthenticatedRoles"]; response = nil; } else @@ -136,11 +137,11 @@ NSCalendarDate *date; page = [[WOApplication application] pageWithName: @"SOGoRootPage" - forRequest: [context request]]; + forRequest: [context request]]; [[SoDefaultRenderer sharedRenderer] renderObject: page - inContext: context]; + inContext: context]; authCookie = [WOCookie cookieWithName: [self cookieNameInContext: context] - value: @"discard"]; + value: @"discard"]; [authCookie setPath: @"/"]; date = [NSCalendarDate calendarDate]; [authCookie setExpires: [date yesterday]];