20170629000001_exchange_integration.rb 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
  2. class ExchangeIntegration < ActiveRecord::Migration[4.2]
  3. def up
  4. # return if it's a new setup
  5. return if !Setting.exists?(name: 'system_init_done')
  6. Setting.set('import_backends', ['Import::Ldap', 'Import::Exchange'])
  7. Setting.create_if_not_exists(
  8. title: 'Exchange config',
  9. name: 'exchange_config',
  10. area: 'Integration::Exchange',
  11. description: 'Defines the Exchange config.',
  12. options: {},
  13. state: {},
  14. preferences: {
  15. prio: 2,
  16. permission: ['admin.integration'],
  17. },
  18. frontend: false,
  19. )
  20. Setting.create_if_not_exists(
  21. title: 'Exchange integration',
  22. name: 'exchange_integration',
  23. area: 'Integration::Switch',
  24. description: 'Defines if Exchange is enabled or not.',
  25. options: {
  26. form: [
  27. {
  28. display: '',
  29. null: true,
  30. name: 'exchange_integration',
  31. tag: 'boolean',
  32. options: {
  33. true => 'yes',
  34. false => 'no',
  35. },
  36. },
  37. ],
  38. },
  39. state: false,
  40. preferences: {
  41. prio: 1,
  42. authentication: true,
  43. permission: ['admin.integration'],
  44. },
  45. frontend: true
  46. )
  47. end
  48. end