20220624173829_setting_password_login.rb 1002 B

1234567891011121314151617181920212223242526272829303132333435
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class SettingPasswordLogin < ActiveRecord::Migration[6.1]
  3. def change
  4. # return if it's a new setup
  5. return if !Setting.exists?(name: 'system_init_done')
  6. Setting.create_if_not_exists(
  7. title: 'Password Login',
  8. name: 'user_show_password_login',
  9. area: 'Security::Base',
  10. description: 'Show password login for users on login page. Disabling only takes effect if third-party authentication is enabled.',
  11. options: {
  12. form: [
  13. {
  14. display: '',
  15. null: true,
  16. name: 'user_show_password_login',
  17. tag: 'boolean',
  18. options: {
  19. true => 'yes',
  20. false => 'no',
  21. },
  22. },
  23. ],
  24. },
  25. state: true,
  26. preferences: {
  27. prio: 25,
  28. permission: ['admin.security'],
  29. },
  30. frontend: true
  31. )
  32. end
  33. end