- Maximum attempts changed from 5 to 20

- Lockable is not turned on by default
- Fixed lockable incompatibilities with latest commits
This commit is contained in:
Marcelo Silveira
2010-01-09 11:41:28 -02:00
parent 32991e13c4
commit 9c4ddc6465
8 changed files with 10 additions and 9 deletions

View File

@@ -4,7 +4,7 @@ class UnlockInstructionsTest < ActionMailer::TestCase
def setup
setup_mailer
DeviseMailer.sender = 'test@example.com'
Devise.mailer_sender = 'test@example.com'
end
def user

View File

@@ -98,7 +98,7 @@ class ActiveRecordTest < ActiveSupport::TestCase
test 'add all modules' do
assert_include_modules Devisable,
:authenticatable, :confirmable, :recoverable, :rememberable, :trackable, :validatable, :lockable
:authenticatable, :confirmable, :recoverable, :rememberable, :trackable, :validatable
end
test 'configure modules with except option' do

View File

@@ -1,4 +1,4 @@
class User < ActiveRecord::Base
devise :all, :timeoutable
devise :all, :timeoutable, :lockable
attr_accessible :username, :email, :password, :password_confirmation
end

View File

@@ -8,7 +8,7 @@ Devise.setup do |config|
# Remember that Devise includes other modules on its own (like :activatable
# and :timeoutable) which are not included here and also plugins. So be sure
# to check the docs for a complete set.
config.all = [:authenticatable, :confirmable, :recoverable, :rememberable, :trackable, :validatable, :lockable]
config.all = [:authenticatable, :confirmable, :recoverable, :rememberable, :trackable, :validatable]
# Invoke `rake secret` and use the printed value to setup a pepper to generate
# the encrypted password. By default no pepper is used.
@@ -55,7 +55,7 @@ Devise.setup do |config|
# config.scoped_views = true
# Number of authentication tries before locking an account.
# config.maximum_attempts = 5
# config.maximum_attempts = 20
# Defines which strategy will be used to unlock an account.
# :email = Sends an unlock link to the user email