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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
0e276f9c
Commit
0e276f9c
authored
Oct 03, 2014
by
Jan-Willem van der Meer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move allowed call to LDAP::User
parent
ce22ffbc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
app/controllers/omniauth_callbacks_controller.rb
app/controllers/omniauth_callbacks_controller.rb
+1
-1
lib/gitlab/ldap/user.rb
lib/gitlab/ldap/user.rb
+4
-0
No files found.
app/controllers/omniauth_callbacks_controller.rb
View file @
0e276f9c
...
...
@@ -24,7 +24,7 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
gl_user
.
remember_me
=
true
if
@user
.
persisted?
# Do additional LDAP checks for the user filter and EE features
if
Gitlab
::
LDAP
::
Access
.
allowed?
(
gl_user
)
if
@user
.
allowed?
sign_in_and_redirect
(
gl_user
)
else
flash
[
:alert
]
=
"Access denied for your LDAP account."
...
...
lib/gitlab/ldap/user.rb
View file @
0e276f9c
...
...
@@ -89,6 +89,10 @@ module Gitlab
def
needs_blocking?
false
end
def
allowed?
Gitlab
::
LDAP
::
Access
.
allowed?
(
gl_user
)
end
end
end
end
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