initiator.rb 412 B

12345678910111213141516171819
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class Sequencer::Unit::Import::Zendesk::User::Initiator < Sequencer::Unit::Base
  3. uses :resource
  4. provides :initiator
  5. def process
  6. state.provide(:initiator, initiator?)
  7. end
  8. private
  9. def initiator?
  10. return false if resource.email.blank?
  11. resource.email == Setting.get('import_zendesk_endpoint_username')
  12. end
  13. end