2021-06-01 12:20:20 +00:00
|
|
|
# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
|
|
|
|
|
2021-06-23 11:35:27 +00:00
|
|
|
module User::HasTicketCreateScreenImpact
|
|
|
|
extend ActiveSupport::Concern
|
2020-02-20 13:34:03 +00:00
|
|
|
|
2021-06-23 11:35:27 +00:00
|
|
|
def push_ticket_create_screen?
|
|
|
|
return true if destroyed?
|
|
|
|
return false if %w[id login firstname lastname preferences active].none? do |attribute|
|
|
|
|
saved_change_to_attribute?(attribute)
|
2020-02-20 13:34:03 +00:00
|
|
|
end
|
2021-06-23 11:35:27 +00:00
|
|
|
|
|
|
|
permissions?('ticket.agent')
|
2020-02-20 13:34:03 +00:00
|
|
|
end
|
|
|
|
end
|