macro.rb 585 B

12345678910111213141516171819
  1. # Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
  2. class Macro < ApplicationModel
  3. include ChecksClientNotification
  4. include ChecksHtmlSanitized
  5. include ChecksLatestChangeObserved
  6. include CanSeed
  7. include HasCollectionUpdate
  8. store :perform
  9. validates :name, presence: true
  10. validates :ux_flow_next_up, inclusion: { in: %w[none next_task next_from_overview] }
  11. has_and_belongs_to_many :groups, after_add: :cache_update, after_remove: :cache_update, class_name: 'Group'
  12. sanitized_html :note
  13. collection_push_permission('ticket.agent')
  14. end