Commit graph

6 commits

Author SHA1 Message Date
randx 366c0065c4 Merge branch 'better_ldap' of https://github.com/jirutka/gitlabhq into jirutka-better_ldap
Conflicts:
	app/models/user.rb
2012-08-21 08:39:23 +03:00
Jakub Jirutka fa5a53f5ed Change identification of users with extern auth provider (LDAP) 2012-07-29 16:15:52 +02:00
Pat Thoyts a2d244ec06 Handle LDAP missing credentials error with a flash message.
If a user fails to provide a username or password to the LDAP login
form then a 500 error is returned due to an exception being raised
in omniauth-ldap. This gem has been amended to use the omniauth
error propagation function (fail!) to pass this exception message to
the registered omniauth failure handler so that the Rails application
can handle it approriately.

The failure function now knows about standard exceptions and no longer
requires a specific check for the OmniAuth::Error exception added by
commit f322975.

This resolves issue #1077.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2012-07-21 09:04:05 +01:00
Pat Thoyts f322975c50 Improve handling of misconfigured LDAP accounts.
Gitlab requires an email address for all user accounts as this is the
default account id and is used for sending notifications. LDAP accounts
may be missing email fields so handle this by showing a sensible error
message before redirecting to the login screen again.

Resolves github issue #899

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2012-07-16 23:31:28 +01:00
Steve Prentice 2bb2dee057 Use the omniauth-ldap info object instead of the raw ldap info in extra.
This helps with compatibility with more LDAP providers as the implementation
doesn't depend on the exact names of the LDAP fields. The LDAP strategy
helps maps the attributes to the fields in the info object and we use the
info object to get the email and name.

This makes the LDAP auth compatible with most OpenLDAP servers as well.
2012-02-17 09:10:50 -08:00
vsizov d6a0b8f428 LDAP done 2012-01-28 16:23:17 +03:00