application.rb 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. config.active_job.queue_adapter = :delayed_job
  20. # Use custom logger to log Thread id next to Process pid
  21. config.log_formatter = ::Logger::Formatter.new
  22. # REST api path
  23. config.api_path = '/api/v1'
  24. # define cache store
  25. config.cache_store = :file_store, Rails.root.join('tmp', "cache_file_store_#{Rails.env}")
  26. # default preferences by permission
  27. config.preferences_default_by_permission = {
  28. 'ticket.agent' => {
  29. notification_config: {
  30. matrix: {
  31. create: {
  32. criteria: {
  33. owned_by_me: true,
  34. owned_by_nobody: true,
  35. subscribed: true,
  36. no: false,
  37. },
  38. channel: {
  39. email: true,
  40. online: true,
  41. }
  42. },
  43. update: {
  44. criteria: {
  45. owned_by_me: true,
  46. owned_by_nobody: true,
  47. subscribed: true,
  48. no: false,
  49. },
  50. channel: {
  51. email: true,
  52. online: true,
  53. }
  54. },
  55. reminder_reached: {
  56. criteria: {
  57. owned_by_me: true,
  58. owned_by_nobody: false,
  59. subscribed: false,
  60. no: false,
  61. },
  62. channel: {
  63. email: true,
  64. online: true,
  65. }
  66. },
  67. escalation: {
  68. criteria: {
  69. owned_by_me: true,
  70. owned_by_nobody: false,
  71. subscribed: false,
  72. no: false,
  73. },
  74. channel: {
  75. email: true,
  76. online: true,
  77. }
  78. }
  79. }
  80. }
  81. }
  82. }
  83. end
  84. end