Class: Types::Notes::DiscussionType

Inherits:
BaseObject
  • Object
show all
Defined in:
app/graphql/types/notes/discussion_type.rb

Instance Method Summary collapse

Methods inherited from BaseObject

accepts, assignable?, authorization, authorization_scopes, authorize, authorized?, #current_user, #id

Methods included from Gitlab::Graphql::Present

#present, #unpresented

Instance Method Details

#noteableObject



17
18
19
20
21
22
23
# File 'app/graphql/types/notes/discussion_type.rb', line 17

def noteable
  noteable = object.noteable

  return unless Ability.allowed?(context[:current_user], :"read_#{noteable.to_ability_name}", noteable)

  noteable
end