trabajo-afectivo/lib/sequencer/unit/import/zendesk/user/initiator.rb

30 lines
620 B
Ruby
Raw Permalink Normal View History

2022-01-01 13:38:12 +00:00
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
class Sequencer
class Unit
module Import
module Zendesk
module User
class Initiator < Sequencer::Unit::Base
uses :resource
provides :initiator
def process
state.provide(:initiator, initiator?)
end
private
def initiator?
return false if resource.email.blank?
resource.email == Setting.get('import_zendesk_endpoint_username')
end
end
end
end
end
end
end