agent.rb 394 B

1234567891011121314151617
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. module Gql::Queries
  3. class AutocompleteSearch::Agent < AutocompleteSearch::User
  4. description 'Search for agents'
  5. def find_users(query:, limit:)
  6. ::User.search(
  7. query:,
  8. limit:,
  9. current_user: context.current_user,
  10. permissions: ['ticket.agent'],
  11. )
  12. end
  13. end
  14. end