From 80e74f3de2d269002f98d977fb4611af7e1a4baa Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 18 Oct 2007 22:48:34 +0000 Subject: [PATCH] Monotone-Parent: 061cba1969b1c526f888bff270f05c4fbb1825d1 Monotone-Revision: 2b34b89b1b94711bf4f516a1204ac918c0e2edd2 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-10-18T22:48:34 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 4 ++++ SoObjects/SOGo/SOGoWebAuthenticator.m | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/ChangeLog b/ChangeLog index 83e939081..82b636751 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2007-10-18 Wolfgang Sourdeau + * SoObjects/SOGo/SOGoWebAuthenticator.m ([SOGoWebAuthenticator + -userInContext:]): override the super method by returning + anonymous if the super returns nil. + * UI/Common/UIxPageFrame.m ([UIxPageFrame -productLocalizableStrings]): new method that returns the product-specific translation dictionary as a JSON hash. diff --git a/SoObjects/SOGo/SOGoWebAuthenticator.m b/SoObjects/SOGo/SOGoWebAuthenticator.m index 36a962826..68c802592 100644 --- a/SoObjects/SOGo/SOGoWebAuthenticator.m +++ b/SoObjects/SOGo/SOGoWebAuthenticator.m @@ -92,6 +92,23 @@ // && [_pwd isEqualToString: @"freebusy"])); } +- (SOGoUser *) userInContext: (WOContext *)_ctx +{ + 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; + + return user; +} + - (NSString *) passwordInContext: (WOContext *) context { NSArray *creds;