Class: Types::Notes::DiscussionType

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

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseObject

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

Methods included from Gitlab::Graphql::Present

#present, #unpresented

Class Method Details

.authorization_scopesObject



10
11
12
# File 'app/graphql/types/notes/discussion_type.rb', line 10

def self.authorization_scopes
  super + [:ai_workflows]
end

Instance Method Details

#noteableObject



23
24
25
26
27
28
29
# File 'app/graphql/types/notes/discussion_type.rb', line 23

def noteable
  noteable = object.noteable

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

  noteable
end