list.rb 513 B

1234567891011121314151617181920
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. module Gql::Queries
  3. class User::Current::Overview::List < BaseQuery
  4. description 'Fetch available overviews of the currently logged-in user'
  5. type [Gql::Types::OverviewType], null: false
  6. def self.authorize(_obj, ctx)
  7. ctx.current_user.permissions?('user_preferences.overview_sorting')
  8. end
  9. def resolve
  10. Service::User::Overview::List
  11. .new(context.current_user)
  12. .execute
  13. end
  14. end
  15. end