blob: 406c52eb0d5d87fe32688400735d81f18380d1d8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# frozen_string_literal: true
module Resolvers
module AwardEmoji
class BaseVotesCountResolver < BaseResolver
include Gitlab::Graphql::Authorize::AuthorizeResource
type GraphQL::Types::Int, null: true
private
def authorized_resource?(object)
Ability.allowed?(current_user, "read_#{object.to_ability_name}".to_sym, object)
end
def votes_batch_loader
BatchLoaders::AwardEmojiVotesBatchLoader
end
end
end
end
|