Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Duncan White
devise-kerberos-authenticatable
Commits
55dd5e61
Commit
55dd5e61
authored
Jun 23, 2015
by
Simon Stueckemann
Browse files
Migrate from deprecated 'scoped' method to 'all'
parent
4522d276
Changes
2
Hide whitespace changes
Inline
Side-by-side
devise-kerberos-authenticatable.gemspec
View file @
55dd5e61
...
@@ -2,7 +2,7 @@ require 'rake'
...
@@ -2,7 +2,7 @@ require 'rake'
Gem
::
Specification
.
new
do
|
s
|
Gem
::
Specification
.
new
do
|
s
|
s
.
name
=
'devise-kerberos-authenticatable'
s
.
name
=
'devise-kerberos-authenticatable'
s
.
version
=
'0.1.
2
'
s
.
version
=
'0.1.
3
'
s
.
date
=
'2015-06-23'
s
.
date
=
'2015-06-23'
s
.
summary
=
'Devise authentication strategy for Kerberos'
s
.
summary
=
'Devise authentication strategy for Kerberos'
s
.
description
=
'Devise extension providing the ability to authenticate
s
.
description
=
'Devise extension providing the ability to authenticate
...
...
lib/devise_kerberos_authenticatable/model.rb
View file @
55dd5e61
...
@@ -23,7 +23,7 @@ module Devise
...
@@ -23,7 +23,7 @@ module Devise
def
authenticate_with_kerberos
(
attributes
=
{})
def
authenticate_with_kerberos
(
attributes
=
{})
return
nil
unless
attributes
[
:username
].
present?
return
nil
unless
attributes
[
:username
].
present?
resource
=
scoped
.
where
(
:username
=>
attributes
[
'username'
]).
first
resource
=
all
.
where
(
:username
=>
attributes
[
'username'
]).
first
if
resource
.
blank?
if
resource
.
blank?
resource
=
new
resource
=
new
...
...
Write
Preview
Supports
Markdown
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