From 4a46b725c7cacd460fdc49eb67830bd15d7817e6 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 20 Nov 2009 20:25:13 +0000 Subject: [PATCH] Monotone-Parent: 3e6948059832484bb80a8445b88f9673d85ac1ba Monotone-Revision: dbf0e1c560253d898374155e0aa7bd9b90bc6555 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-11-20T20:25:13 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 12 +++++++ SoObjects/SOGo/SOGoDAVAuthenticator.h | 3 -- SoObjects/SOGo/SOGoDAVAuthenticator.m | 46 ++---------------------- SoObjects/SOGo/SOGoProxyAuthenticator.h | 3 -- SoObjects/SOGo/SOGoProxyAuthenticator.m | 28 --------------- SoObjects/SOGo/SOGoWebAuthenticator.h | 3 -- SoObjects/SOGo/SOGoWebAuthenticator.m | 48 ++----------------------- 7 files changed, 16 insertions(+), 127 deletions(-) diff --git a/ChangeLog b/ChangeLog index ebfdd69a7..abbed1874 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,17 @@ 2009-11-20 Wolfgang Sourdeau + * SoObjects/SOGo/SOGoDAVAuthenticator.m (-init): removed method, + removed the "SOGoAuthenticationMethod" user default, which was + never used. + + * SoObjects/SOGo/SOGoWebAuthenticator.m (-init): removed method, + removed the "SOGoAuthenticationMethod" user default, which was + never used. + + * SoObjects/SOGo/SOGoProxyAuthenticator.m (-init): removed method, + removed the "SOGoAuthenticationMethod" user default, which was + never used. + * Main/sogod.m (prepareUserDefaults): replaces "convertOldSOGoDomain", automatically set WOMessageUseUTF8, WOParsersUseUTF8 and NGUseUTF8AsURLEncoding to YES in the user diff --git a/SoObjects/SOGo/SOGoDAVAuthenticator.h b/SoObjects/SOGo/SOGoDAVAuthenticator.h index 3adfb3c13..37e0becff 100644 --- a/SoObjects/SOGo/SOGoDAVAuthenticator.h +++ b/SoObjects/SOGo/SOGoDAVAuthenticator.h @@ -39,9 +39,6 @@ @class SOGoUser; @interface SOGoDAVAuthenticator : SoHTTPAuthenticator -{ - NSString *authMethod; -} + (id) sharedSOGoDAVAuthenticator; diff --git a/SoObjects/SOGo/SOGoDAVAuthenticator.m b/SoObjects/SOGo/SOGoDAVAuthenticator.m index 95fcb3417..665cc1cec 100644 --- a/SoObjects/SOGo/SOGoDAVAuthenticator.m +++ b/SoObjects/SOGo/SOGoDAVAuthenticator.m @@ -46,53 +46,11 @@ return auth; } -- (id) init -{ - NSUserDefaults *ud; - - if ((self = [super init])) - { - ud = [NSUserDefaults standardUserDefaults]; - authMethod = [ud stringForKey: @"SOGoAuthenticationMethod"]; - if (!authMethod) - authMethod = [ud stringForKey: @"SOGoAuthentificationMethod"]; - if (!authMethod) - { - authMethod = @"LDAP"; - [self warnWithFormat: - @"authentication method automatically set to '%@'", - authMethod]; - } - } - - return self; -} - -- (void) dealloc -{ - [authMethod release]; - [super dealloc]; -} - - (BOOL) checkLogin: (NSString *) _login password: (NSString *) _pwd { - BOOL accept; - SOGoUserManager *um; - - if ([authMethod isEqualToString: @"LDAP"]) - { - um = [SOGoUserManager sharedUserManager]; - accept = [um checkLogin: _login andPassword: _pwd]; - } - else - accept = NO; -// accept = ([authMethod isEqualToString: @"bypass"] -// && [_login length] > 0); - - return accept; -// || ([_login isEqualToString: @"freebusy"] -// && [_pwd isEqualToString: @"freebusy"])); + return [[SOGoUserManager sharedUserManager] checkLogin: _login + andPassword: _pwd]; } - (NSString *) passwordInContext: (WOContext *) context diff --git a/SoObjects/SOGo/SOGoProxyAuthenticator.h b/SoObjects/SOGo/SOGoProxyAuthenticator.h index 7ee03dd9a..8bbc73a86 100644 --- a/SoObjects/SOGo/SOGoProxyAuthenticator.h +++ b/SoObjects/SOGo/SOGoProxyAuthenticator.h @@ -42,9 +42,6 @@ // @interface SOGoProxyAuthenticator : SoHTTPAuthenticator @interface SOGoProxyAuthenticator : NSObject -{ - NSString *authMethod; -} + (id) sharedSOGoProxyAuthenticator; diff --git a/SoObjects/SOGo/SOGoProxyAuthenticator.m b/SoObjects/SOGo/SOGoProxyAuthenticator.m index 024e06a78..b6ff638ba 100644 --- a/SoObjects/SOGo/SOGoProxyAuthenticator.m +++ b/SoObjects/SOGo/SOGoProxyAuthenticator.m @@ -48,34 +48,6 @@ return auth; } -- (id) init -{ - NSUserDefaults *ud; - - if ((self = [super init])) - { - ud = [NSUserDefaults standardUserDefaults]; - authMethod = [ud stringForKey: @"SOGoAuthenticationMethod"]; - if (!authMethod) - authMethod = [ud stringForKey: @"SOGoAuthentificationMethod"]; - if (!authMethod) - { - authMethod = @"LDAP"; - [self warnWithFormat: - @"authentication method automatically set to '%@'", - authMethod]; - } - } - - return self; -} - -- (void) dealloc -{ - [authMethod release]; - [super dealloc]; -} - - (BOOL) checkLogin: (NSString *) _login password: (NSString *) _pwd { diff --git a/SoObjects/SOGo/SOGoWebAuthenticator.h b/SoObjects/SOGo/SOGoWebAuthenticator.h index 1e1fa4bf9..84f476ea1 100644 --- a/SoObjects/SOGo/SOGoWebAuthenticator.h +++ b/SoObjects/SOGo/SOGoWebAuthenticator.h @@ -31,9 +31,6 @@ @class SOGoUser; @interface SOGoWebAuthenticator : SoCookieAuthenticator -{ - NSString *authMethod; -} + (id) sharedSOGoWebAuthenticator; diff --git a/SoObjects/SOGo/SOGoWebAuthenticator.m b/SoObjects/SOGo/SOGoWebAuthenticator.m index bda7bdc4c..40c6ee314 100644 --- a/SoObjects/SOGo/SOGoWebAuthenticator.m +++ b/SoObjects/SOGo/SOGoWebAuthenticator.m @@ -55,55 +55,11 @@ return auth; } -- (id) init -{ - NSUserDefaults *ud; - - if ((self = [super init])) - { - ud = [NSUserDefaults standardUserDefaults]; - authMethod = [ud stringForKey: @"SOGoAuthenticationMethod"]; - if (!authMethod) - authMethod = [ud stringForKey: @"SOGoAuthentificationMethod"]; - if (!authMethod) - { - authMethod = @"LDAP"; - [self warnWithFormat: - @"authentication method automatically set to '%@'", - authMethod]; - } - [authMethod retain]; - } - - return self; -} - -- (void) dealloc -{ - [authMethod release]; - [super dealloc]; -} - - (BOOL) checkLogin: (NSString *) _login password: (NSString *) _pwd { - BOOL accept; - SOGoUserManager *um; - - if ([authMethod isEqualToString: @"LDAP"]) - { - um = [SOGoUserManager sharedUserManager]; - accept = [um checkLogin: _login andPassword: _pwd]; - } - else - accept = NO; -// else -// accept = ([authMethod isEqualToString: @"bypass"] -// && [_login length] > 0); - - return accept; -// || ([_login isEqualToString: @"freebusy"] -// && [_pwd isEqualToString: @"freebusy"])); + return [[SOGoUserManager sharedUserManager] checkLogin: _login + andPassword: _pwd]; } - (SOGoUser *) userInContext: (WOContext *)_ctx