base.rb 439 B

1234567891011121314151617
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. module Gql::Mutations
  3. class Mention::Base < BaseMutation # rubocop:disable GraphQL/ObjectDescription
  4. protected
  5. def fetch_object(object_id)
  6. Gql::ZammadSchema
  7. .authorized_object_from_id(
  8. object_id,
  9. user: context.current_user,
  10. query: :agent_read_access?,
  11. type: ::Ticket
  12. )
  13. end
  14. end
  15. end