2021-06-01 12:20:20 +00:00
|
|
|
# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
|
|
|
|
|
2018-01-08 15:29:34 +00:00
|
|
|
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?
|
2018-10-09 06:17:41 +00:00
|
|
|
|
2018-01-08 15:29:34 +00:00
|
|
|
resource.email == Setting.get('import_zendesk_endpoint_username')
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|