Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
1bb804da
Commit
1bb804da
authored
Mar 27, 2012
by
Valery Sizov
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:gitlabhq/gitlabhq
parents
442d5dbe
27cd6c75
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
13 deletions
+20
-13
.gitignore
.gitignore
+1
-0
app/models/user.rb
app/models/user.rb
+1
-1
config/initializers/devise.rb
config/initializers/devise.rb
+3
-12
config/initializers/omniauth.rb.sample
config/initializers/omniauth.rb.sample
+15
-0
No files found.
.gitignore
View file @
1bb804da
...
@@ -16,4 +16,5 @@ Vagrantfile
...
@@ -16,4 +16,5 @@ Vagrantfile
.vagrant
.vagrant
config/gitlab.yml
config/gitlab.yml
config/database.yml
config/database.yml
config/initializers/omniauth.rb
db/data.yml
db/data.yml
app/models/user.rb
View file @
1bb804da
...
@@ -80,7 +80,7 @@ class User < ActiveRecord::Base
...
@@ -80,7 +80,7 @@ class User < ActiveRecord::Base
def
self
.
find_for_ldap_auth
(
omniauth_info
)
def
self
.
find_for_ldap_auth
(
omniauth_info
)
name
=
omniauth_info
.
name
name
=
omniauth_info
.
name
email
=
omniauth_info
.
email
email
=
omniauth_info
.
email
.
downcase
if
@user
=
User
.
find_by_email
(
email
)
if
@user
=
User
.
find_by_email
(
email
)
@user
@user
...
...
config/initializers/devise.rb
View file @
1bb804da
...
@@ -195,18 +195,9 @@ Devise.setup do |config|
...
@@ -195,18 +195,9 @@ Devise.setup do |config|
config
.
sign_out_via
=
:delete
config
.
sign_out_via
=
:delete
# ==> OmniAuth
# ==> OmniAuth
# Add a new OmniAuth provider. Check the wiki for more information on setting
# To configure a new OmniAuth provider copy and edit omniauth.rb.sample
# up on your models and hooks.
# selecting the provider you require.
# config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
# Check the wiki for more information on setting up on your models
#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'
# ==> Warden configuration
# ==> Warden configuration
# If you want to use other strategies, that are not supported by Devise, or
# If you want to use other strategies, that are not supported by Devise, or
...
...
config/initializers/omniauth.rb.sample
0 → 100644
View file @
1bb804da
# 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
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment