Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'config/initializers/8_devise.rb')
-rw-r--r--config/initializers/8_devise.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/config/initializers/8_devise.rb b/config/initializers/8_devise.rb
index 3682a391033..9ea26602a13 100644
--- a/config/initializers/8_devise.rb
+++ b/config/initializers/8_devise.rb
@@ -162,10 +162,18 @@ Devise.setup do |config|
# Number of authentication tries before locking an account if lock_strategy
# is failed attempts.
- config.maximum_attempts = 10
+ config.maximum_attempts = if Gitlab::CurrentSettings.max_login_attempts_column_exists?
+ (Gitlab::CurrentSettings.max_login_attempts || 10)
+ else
+ 10
+ end
# Time interval to unlock the account if :time is enabled as unlock_strategy.
- config.unlock_in = 10.minutes
+ config.unlock_in = if Gitlab::CurrentSettings.failed_login_attempts_unlock_period_in_minutes_column_exists?
+ (Gitlab::CurrentSettings.failed_login_attempts_unlock_period_in_minutes || 10).minutes
+ else
+ 10.minutes
+ end
# ==> Configuration for :recoverable
#