20210731132202_setting_update_password_max_login_failed.rb 390 B

123456789101112
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class SettingUpdatePasswordMaxLoginFailed < ActiveRecord::Migration[6.0]
  3. def change
  4. return if !Setting.exists?(name: 'system_init_done')
  5. setting = Setting.find_by(name: 'password_max_login_failed')
  6. setting.preferences[:authentication] = true
  7. setting.frontend = true
  8. setting.save!
  9. end
  10. end