20180418000001_setting_third_party_link_account_at_login.rb 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. class SettingThirdPartyLinkAccountAtLogin < ActiveRecord::Migration[5.1]
  3. def up
  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: 'Automatic account link on initial logon',
  8. name: 'auth_third_party_auto_link_at_inital_login',
  9. area: 'Security::ThirdPartyAuthentication',
  10. description: 'Enables the automatic linking of an existing account on initial login via a third party application. If this is disabled, an existing user must first log into Zammad and then link his "Third Party" account to his Zammad account via Profile -> Linked Accounts.',
  11. options: {
  12. form: [
  13. {
  14. display: '',
  15. null: true,
  16. name: 'auth_third_party_auto_link_at_inital_login',
  17. tag: 'boolean',
  18. options: {
  19. true => 'yes',
  20. false => 'no',
  21. },
  22. },
  23. ],
  24. },
  25. preferences: {
  26. permission: ['admin.security'],
  27. prio: 10,
  28. },
  29. state: false,
  30. frontend: false
  31. )
  32. end
  33. end