Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
318a148db08b
Commit
aefe4dc3
authored
Jun 29, 2012
by
Saito
Browse files
fix a npe, and need a patch for path_info
parent
585d91dcf1cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
config/initializers/grack_auth.rb
View file @
318a148d
...
...
@@ -5,7 +5,10 @@ def valid?
# Authentication with username and password
email
,
password
=
@auth
.
credentials
user
=
User
.
find_by_email
(
email
)
return
false
unless
user
.
valid_password?
(
password
)
return
false
unless
user
.
try
(
:valid_password?
,
password
)
# Need this patch because the rails mount
@env
[
'PATH_INFO'
]
=
@env
[
'REQUEST_PATH'
]
# Find project by PATH_INFO from env
if
m
=
/^\/([\w-]+).git/
.
match
(
@env
[
'PATH_INFO'
]).
to_a
...
...
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