2021-06-01 12:20:20 +00:00
|
|
|
# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
|
2015-10-15 13:23:41 +00:00
|
|
|
|
|
|
|
class Macro < ApplicationModel
|
2017-05-02 15:21:13 +00:00
|
|
|
include ChecksClientNotification
|
2021-04-12 09:49:26 +00:00
|
|
|
include ChecksHtmlSanitized
|
2017-05-02 15:21:13 +00:00
|
|
|
include ChecksLatestChangeObserved
|
2017-05-14 18:41:25 +00:00
|
|
|
include CanSeed
|
2020-02-20 13:34:03 +00:00
|
|
|
include HasCollectionUpdate
|
2017-01-31 17:13:45 +00:00
|
|
|
|
2015-10-15 13:23:41 +00:00
|
|
|
store :perform
|
|
|
|
validates :name, presence: true
|
2018-06-11 07:28:03 +00:00
|
|
|
validates :ux_flow_next_up, inclusion: { in: %w[none next_task next_from_overview] }
|
2019-09-04 07:42:50 +00:00
|
|
|
|
|
|
|
has_and_belongs_to_many :groups, after_add: :cache_update, after_remove: :cache_update, class_name: 'Group'
|
2020-02-20 13:34:03 +00:00
|
|
|
|
2021-04-12 09:49:26 +00:00
|
|
|
sanitized_html :note
|
|
|
|
|
2020-02-20 13:34:03 +00:00
|
|
|
collection_push_permission('ticket.agent')
|
2015-10-15 13:23:41 +00:00
|
|
|
end
|