20221209095600_issue_4410_account_linking_notification.rb 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. class Issue4410AccountLinkingNotification < 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: 'Automatic account linking notification',
  8. name: 'auth_third_party_linking_notification',
  9. area: 'Security::ThirdPartyAuthentication',
  10. description: 'Enables sending of an email notification to a user when they link their account with a third-party application.',
  11. options: {
  12. form: [
  13. {
  14. display: '',
  15. null: true,
  16. name: 'auth_third_party_linking_notification',
  17. tag: 'boolean',
  18. options: {
  19. true => 'yes',
  20. false => 'no',
  21. },
  22. },
  23. ],
  24. },
  25. preferences: {
  26. permission: ['admin.security'],
  27. prio: 20,
  28. },
  29. state: false,
  30. frontend: false
  31. )
  32. end
  33. end