summaryrefslogtreecommitdiffstats
path: root/app/models/auth_source_ldap.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-02-19 18:13:46 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-02-19 18:13:46 +0000
commit3e3d7c8d4f4f93fae3c81eb20a13af8fbe3600ef (patch)
treea9a0ac4d40f0ab414e8e6d1221912e850fcccb94 /app/models/auth_source_ldap.rb
parent59c2530001b49e3acfa36672c2ffc91eba5923c5 (diff)
downloadredmine-3e3d7c8d4f4f93fae3c81eb20a13af8fbe3600ef.tar.gz
redmine-3e3d7c8d4f4f93fae3c81eb20a13af8fbe3600ef.zip
Friendly response when the LDAP connection fails.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8911 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/auth_source_ldap.rb')
-rw-r--r--app/models/auth_source_ldap.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/auth_source_ldap.rb b/app/models/auth_source_ldap.rb
index cfb02b881..5c6d28cb2 100644
--- a/app/models/auth_source_ldap.rb
+++ b/app/models/auth_source_ldap.rb
@@ -40,8 +40,8 @@ class AuthSourceLdap < AuthSource
logger.debug "Authentication successful for '#{login}'" if logger && logger.debug?
return attrs.except(:dn)
end
- rescue Net::LDAP::LdapError => text
- raise "LdapError: " + text
+ rescue Net::LDAP::LdapError => e
+ raise AuthSourceException.new(e.message)
end
# test the connection to the LDAP