2012-04-10 13:31:21 +00:00
|
|
|
require File.expand_path('../boot', __FILE__)
|
|
|
|
|
|
|
|
require 'rails/all'
|
|
|
|
|
2015-09-25 14:37:55 +00:00
|
|
|
# Require the gems listed in Gemfile, including any gems
|
|
|
|
# you've limited to :test, :development, or :production.
|
|
|
|
Bundler.require(*Rails.groups)
|
2012-04-10 13:31:21 +00:00
|
|
|
|
|
|
|
module Zammad
|
|
|
|
class Application < Rails::Application
|
|
|
|
# Settings in config/environments/* take precedence over those specified here.
|
|
|
|
# Application configuration should go into files in config/initializers
|
|
|
|
# -- all .rb files in that directory are automatically loaded.
|
|
|
|
|
2015-09-25 14:37:55 +00:00
|
|
|
# Do not swallow errors in after_commit/after_rollback callbacks.
|
|
|
|
config.active_record.raise_in_transactional_callbacks = true
|
|
|
|
|
2012-04-10 13:31:21 +00:00
|
|
|
# Custom directories with classes and modules you want to be autoloadable.
|
2013-09-28 00:07:11 +00:00
|
|
|
config.autoload_paths += %W(#{config.root}/lib)
|
2012-04-10 13:31:21 +00:00
|
|
|
|
|
|
|
# Activate observers that should always be running.
|
|
|
|
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
2013-06-19 00:40:42 +00:00
|
|
|
config.active_record.observers =
|
2013-07-26 21:45:16 +00:00
|
|
|
'observer::_session',
|
2012-11-18 11:04:03 +00:00
|
|
|
'observer::_ticket::_close_time',
|
|
|
|
'observer::_ticket::_user_ticket_counter',
|
2015-05-01 15:24:17 +00:00
|
|
|
'observer::_ticket::_article_changes',
|
2012-12-24 13:55:43 +00:00
|
|
|
'observer::_ticket::_article::_fillup_from_general',
|
|
|
|
'observer::_ticket::_article::_fillup_from_email',
|
|
|
|
'observer::_ticket::_article::_communicate_email',
|
|
|
|
'observer::_ticket::_article::_communicate_facebook',
|
|
|
|
'observer::_ticket::_article::_communicate_twitter',
|
2017-02-15 02:35:22 +00:00
|
|
|
'observer::_ticket::_article::_communicate_telegram',
|
2013-03-05 12:31:23 +00:00
|
|
|
'observer::_ticket::_reset_new_state',
|
2015-02-06 08:59:08 +00:00
|
|
|
'observer::_ticket::_ref_object_touch',
|
2015-04-01 14:33:24 +00:00
|
|
|
'observer::_ticket::_online_notification_seen',
|
2015-09-09 06:49:08 +00:00
|
|
|
'observer::_ticket::_stats_reopen',
|
2013-08-06 13:31:27 +00:00
|
|
|
'observer::_tag::_ticket_history',
|
2015-03-08 21:33:17 +00:00
|
|
|
'observer::_user::_ref_object_touch',
|
2015-04-05 20:27:40 +00:00
|
|
|
'observer::_user::_ticket_organization',
|
2015-03-08 21:33:17 +00:00
|
|
|
'observer::_user::_geo',
|
2015-12-11 16:00:04 +00:00
|
|
|
'observer::_organization::_ref_object_touch',
|
2016-04-15 21:56:10 +00:00
|
|
|
'observer::_sla::_ticket_rebuild_escalation',
|
|
|
|
'observer::_transaction'
|
2013-08-06 10:29:35 +00:00
|
|
|
|
2013-08-06 22:10:28 +00:00
|
|
|
# REST api path
|
|
|
|
config.api_path = '/api/v1'
|
|
|
|
|
2015-09-25 14:37:55 +00:00
|
|
|
# define cache store
|
2016-03-16 10:11:00 +00:00
|
|
|
config.cache_store = :file_store, "#{Rails.root}/tmp/cache_file_store_#{Rails.env}"
|
2015-09-25 14:37:55 +00:00
|
|
|
|
2016-09-29 11:25:20 +00:00
|
|
|
# default preferences by permission
|
|
|
|
config.preferences_default_by_permission = {
|
|
|
|
'ticket.agent' => {
|
2016-02-07 13:00:29 +00:00
|
|
|
notification_config: {
|
|
|
|
matrix: {
|
|
|
|
create: {
|
|
|
|
criteria: {
|
|
|
|
owned_by_me: true,
|
|
|
|
owned_by_nobody: true,
|
|
|
|
no: false,
|
|
|
|
},
|
|
|
|
channel: {
|
|
|
|
email: true,
|
|
|
|
online: true,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
update: {
|
|
|
|
criteria: {
|
|
|
|
owned_by_me: true,
|
|
|
|
owned_by_nobody: true,
|
|
|
|
no: false,
|
|
|
|
},
|
|
|
|
channel: {
|
|
|
|
email: true,
|
|
|
|
online: true,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
reminder_reached: {
|
|
|
|
criteria: {
|
|
|
|
owned_by_me: true,
|
2016-02-08 07:25:27 +00:00
|
|
|
owned_by_nobody: false,
|
2016-02-07 13:00:29 +00:00
|
|
|
no: false,
|
|
|
|
},
|
|
|
|
channel: {
|
|
|
|
email: true,
|
|
|
|
online: true,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
escalation: {
|
|
|
|
criteria: {
|
|
|
|
owned_by_me: true,
|
2016-02-08 07:25:27 +00:00
|
|
|
owned_by_nobody: false,
|
2016-02-07 13:00:29 +00:00
|
|
|
no: false,
|
|
|
|
},
|
|
|
|
channel: {
|
|
|
|
email: true,
|
|
|
|
online: true,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2012-04-10 13:31:21 +00:00
|
|
|
end
|
2015-04-27 14:15:29 +00:00
|
|
|
end
|