diff options
author | Robert Speicher <robert@gitlab.com> | 2015-12-21 17:53:20 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2015-12-21 17:53:20 +0000 |
commit | 9570495e75f90d1011531753dd41f0c06e8fcf99 (patch) | |
tree | d3326bfcba348788103a5298ab9d4475bc22b773 /config | |
parent | 17ed42e362032e3594ae1cf34e6a970be826bdca (diff) | |
parent | be41d84fb078667694ecbf5f2729175fbf8b0343 (diff) | |
download | gitlab-ce-9570495e75f90d1011531753dd41f0c06e8fcf99.tar.gz |
Merge branch 'add_email_unlock' into 'master'
Allow account unlock via email
We see a lot of users get confused about what it means when your account gets
locked. Many try to reset their password and are still faced with a lockout.
With this change, users receive an email that allows them to unlock their
account immediately. The previous behavior where the account is auto-unlocked
after a time also still works.
See merge request !2049
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/devise.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index 92149826da7..d82cfb3ec0c 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -121,14 +121,14 @@ Devise.setup do |config| config.lock_strategy = :failed_attempts # Defines which key will be used when locking and unlocking an account - # config.unlock_keys = [ :email ] + config.unlock_keys = [ :email ] # Defines which strategy will be used to unlock an account. # :email = Sends an unlock link to the user email # :time = Re-enables login after a certain amount of time (see :unlock_in below) # :both = Enables both strategies # :none = No unlock strategy. You should handle unlocking by yourself. - config.unlock_strategy = :time + config.unlock_strategy = :both # Number of authentication tries before locking an account if lock_strategy # is failed attempts. |