20180418000001_setting_third_party_link_account_at_login.rb 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. class SettingThirdPartyLinkAccountAtLogin < ActiveRecord::Migration[5.1]
  2. def up
  3. # return if it's a new setup
  4. return if !Setting.exists?(name: 'system_init_done')
  5. Setting.create_if_not_exists(
  6. title: 'Automatic account link on initial logon',
  7. name: 'auth_third_party_auto_link_at_inital_login',
  8. area: 'Security::ThirdPartyAuthentication',
  9. 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.',
  10. options: {
  11. form: [
  12. {
  13. display: '',
  14. null: true,
  15. name: 'auth_third_party_auto_link_at_inital_login',
  16. tag: 'boolean',
  17. options: {
  18. true => 'yes',
  19. false => 'no',
  20. },
  21. },
  22. ],
  23. },
  24. preferences: {
  25. permission: ['admin.security'],
  26. prio: 10,
  27. },
  28. state: false,
  29. frontend: false
  30. )
  31. end
  32. end