Merge branch 'master' of github.com:gitlabhq/gitlabhq

This commit is contained in:
Valery Sizov 2012-03-27 23:04:45 +03:00
commit 1bb804da7f
4 changed files with 20 additions and 13 deletions

1
.gitignore vendored
View file

@ -16,4 +16,5 @@ Vagrantfile
.vagrant
config/gitlab.yml
config/database.yml
config/initializers/omniauth.rb
db/data.yml

View file

@ -80,7 +80,7 @@ class User < ActiveRecord::Base
def self.find_for_ldap_auth(omniauth_info)
name = omniauth_info.name
email = omniauth_info.email
email = omniauth_info.email.downcase
if @user = User.find_by_email(email)
@user

View file

@ -195,18 +195,9 @@ Devise.setup do |config|
config.sign_out_via = :delete
# ==> OmniAuth
# Add a new OmniAuth provider. Check the wiki for more information on setting
# up on your models and hooks.
# config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
#config.omniauth :ldap,
# :host => 'YOUR_LDAP_SERVER',
# :base => 'THE_BASE_WHERE_YOU_SEARCH_FOR_USERS',
# :uid => 'sAMAccountName',
# :port => 389,
# :method => :plain,
# :bind_dn => 'THE_FULL_DN_OF_THE_USER_YOU_WILL_BIND_WITH',
# :password => 'THE_PASSWORD_OF_THE_BIND_USER'
# To configure a new OmniAuth provider copy and edit omniauth.rb.sample
# selecting the provider you require.
# Check the wiki for more information on setting up on your models
# ==> Warden configuration
# If you want to use other strategies, that are not supported by Devise, or

View file

@ -0,0 +1,15 @@
# Copy this file to 'omniauth.rb' and configure it as necessary.
# The wiki has further details on configuring each provider.
Devise.setup do |config|
# config.omniauth :github 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
# config.omniauth :ldap,
# :host => 'YOUR_LDAP_SERVER',
# :base => 'THE_BASE_WHERE_YOU_SEARCH_FOR_USERS',
# :uid => 'sAMAccountName',
# :port => 389,
# :method => :plain,
# :bind_dn => 'THE_FULL_DN_OF_THE_USER_YOU_WILL_BIND_WITH',
# :password => 'THE_PASSWORD_OF_THE_BIND_USER'
end