application.rb 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. require_relative 'boot'
  2. require 'rails/all'
  3. require_relative 'issue_2656_workaround_for_rails_issue_33600'
  4. # DO NOT REMOVE THIS LINE - see issue #2037
  5. Bundler.setup
  6. # Require the gems listed in Gemfile, including any gems
  7. # you've limited to :test, :development, or :production.
  8. Bundler.require(*Rails.groups)
  9. module Zammad
  10. class Application < Rails::Application
  11. # Initialize configuration defaults for originally generated Rails version.
  12. config.load_defaults 5.2
  13. # Settings in config/environments/* take precedence over those specified here.
  14. # Application configuration should go into files in config/initializers
  15. # -- all .rb files in that directory are automatically loaded.
  16. # Custom directories with classes and modules you want to be autoloadable.
  17. config.autoload_paths += %W[#{config.root}/lib]
  18. config.eager_load_paths += %W[#{config.root}/lib]
  19. # Activate observers that should always be running.
  20. # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
  21. config.active_record.observers =
  22. 'observer::_session',
  23. 'observer::_transaction'
  24. config.active_job.queue_adapter = :delayed_job
  25. # Use custom logger to log Thread id next to Process pid
  26. config.log_formatter = ::Logger::Formatter.new
  27. # REST api path
  28. config.api_path = '/api/v1'
  29. # define cache store
  30. config.cache_store = :file_store, Rails.root.join('tmp', "cache_file_store_#{Rails.env}")
  31. # default preferences by permission
  32. config.preferences_default_by_permission = {
  33. 'ticket.agent' => {
  34. notification_config: {
  35. matrix: {
  36. create: {
  37. criteria: {
  38. owned_by_me: true,
  39. owned_by_nobody: true,
  40. subscribed: true,
  41. no: false,
  42. },
  43. channel: {
  44. email: true,
  45. online: true,
  46. }
  47. },
  48. update: {
  49. criteria: {
  50. owned_by_me: true,
  51. owned_by_nobody: true,
  52. subscribed: true,
  53. no: false,
  54. },
  55. channel: {
  56. email: true,
  57. online: true,
  58. }
  59. },
  60. reminder_reached: {
  61. criteria: {
  62. owned_by_me: true,
  63. owned_by_nobody: false,
  64. subscribed: false,
  65. no: false,
  66. },
  67. channel: {
  68. email: true,
  69. online: true,
  70. }
  71. },
  72. escalation: {
  73. criteria: {
  74. owned_by_me: true,
  75. owned_by_nobody: false,
  76. subscribed: false,
  77. no: false,
  78. },
  79. channel: {
  80. email: true,
  81. online: true,
  82. }
  83. }
  84. }
  85. }
  86. }
  87. }
  88. end
  89. end