This reverts commit e9d4587ff1, which is
incompatible with GitLab's built in LDAP user filter: a GitLab LDAP
filter is [added on top of the other filters used to find the
user](982d4d51e8/lib/gitlab/ldap/adapter.rb (L61))
Example GitLab LDAP filter: `(memberOf=cn=foo,dc=bar)`.
In contrast, an omniauth-ldap filter [replaces the 'normal'
filters](76d77543de/lib/omniauth/strategies/ldap.rb (L55))
Example omniauth-ldap user filter:
`(&(uid=%{username})(memberOf=cn=foo,dc=bar))`.
This changes the email "From" field from "gitlab@example.com" to either:
* "John Doe <gitlab@example.com>" if the author of the action is known,
* "GitLab <gitlab@example.com>" otherwise.
Rationale: this allow mails to appear as if they were sent by the
author. It appears in the mailbox more like a real discussion between
the sender and the receiver ("John sent: we should refactor this") and
less like a robot notifying about something.
This refactoring allows a user to use omniauth providers which do not
use ```app_id``` and ```app_secret``` without needing to change the
devise configuration.
Now when you want to signup or change existing email you will be forced
to confirm that you really own this email. You get email with link to
follow in order to confirm your email address
Conflicts:
app/models/user.rb
Provide an omniauth.rb.sample file to avoid encouraging end-users to commit
their provider access details (passwords or api tokens) into their git
repositories.
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>