diff --git a/ChangeLog b/ChangeLog index de615496a..3be5ad04b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-06-15 Wolfgang Sourdeau + + * SoObjects/SOGo/SOGoDAVAuthenticator.m (-checkLogin:password:): + perform authentication in LDAP inconditionnally and fallback on + CAS if enabled for DAV. + 2010-06-14 Francis Lachapelle * UI/WebServerResources/UIxPreferences.js: Fixed a bug when saving diff --git a/SoObjects/SOGo/SOGoDAVAuthenticator.m b/SoObjects/SOGo/SOGoDAVAuthenticator.m index f769b9632..264011e27 100644 --- a/SoObjects/SOGo/SOGoDAVAuthenticator.m +++ b/SoObjects/SOGo/SOGoDAVAuthenticator.m @@ -57,27 +57,24 @@ int expire, grace; BOOL rc; - sd = [SOGoSystemDefaults sharedSystemDefaults]; - if ([[sd davAuthenticationType] isEqualToString: @"cas"]) + perr = PolicyNoError; + rc = ([[SOGoUserManager sharedUserManager] checkLogin: _login + password: _pwd + perr: &perr + expire: &expire + grace: &grace] + && perr == PolicyNoError); + if (!rc) { - /* CAS authentication for DAV requires using a proxy */ - session = [SOGoCASSession CASSessionWithIdentifier: _pwd - fromProxy: YES]; - if (session) - rc = [[session login] isEqualToString: _login]; - else - rc = NO; - } - else - { - perr = PolicyNoError; - - rc = ([[SOGoUserManager sharedUserManager] checkLogin: _login - password: _pwd - perr: &perr - expire: &expire - grace: &grace] - && perr == PolicyNoError); + sd = [SOGoSystemDefaults sharedSystemDefaults]; + if ([[sd davAuthenticationType] isEqualToString: @"cas"]) + { + /* CAS authentication for DAV requires using a proxy */ + session = [SOGoCASSession CASSessionWithIdentifier: _pwd + fromProxy: YES]; + if (session) + rc = [[session login] isEqualToString: _login]; + } } return rc;