Class: Types::Notes::DiscussionType
- Inherits:
-
BaseObject
- Object
- GraphQL::Schema::Object
- BaseObject
- Types::Notes::DiscussionType
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
#present, #unpresented
Class Method Details
.authorization_scopes ⇒ Object
10
11
12
|
# File 'app/graphql/types/notes/discussion_type.rb', line 10
def self.authorization_scopes
super + [:ai_workflows]
end
|
Instance Method Details
#noteable ⇒ Object
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
|