20170816000001_idoit_support.rb 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
  2. class IdoitSupport < 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.create_if_not_exists(
  7. title: 'i-doit integration',
  8. name: 'idoit_integration',
  9. area: 'Integration::Switch',
  10. description: 'Defines if i-doit (http://www.i-doit) is enabled or not.',
  11. options: {
  12. form: [
  13. {
  14. display: '',
  15. null: true,
  16. name: 'idoit_integration',
  17. tag: 'boolean',
  18. options: {
  19. true => 'yes',
  20. false => 'no',
  21. },
  22. },
  23. ],
  24. },
  25. state: false,
  26. preferences: {
  27. prio: 1,
  28. authentication: true,
  29. permission: ['admin.integration'],
  30. },
  31. frontend: true
  32. )
  33. Setting.create_if_not_exists(
  34. title: 'i-doit config',
  35. name: 'idoit_config',
  36. area: 'Integration::Idoit',
  37. description: 'Defines the i-doit config.',
  38. options: {},
  39. state: {},
  40. preferences: {
  41. prio: 2,
  42. permission: ['admin.integration'],
  43. },
  44. frontend: false,
  45. )
  46. end
  47. end