Skip to content

Commit

Permalink
Ticket CV2-3900: Exposing new fields on GraphQL API for shared feeds …
Browse files Browse the repository at this point in the history
…invitations
  • Loading branch information
caiosba committed Oct 27, 2023
1 parent f1167b5 commit ba5ef8e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/graph/types/feed_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,5 @@ def requests(**args)

field :feed_invitations, FeedInvitationType.connection_type, null: false
field :teams, TeamType.connection_type, null: false
field :feed_teams, FeedTeamType.connection_type, null: false
end
1 change: 1 addition & 0 deletions app/graph/types/query_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ def dynamic_annotation_field(query:, only_cache: nil)
feed
request
feed_invitation
feed_team
tipline_message
].each do |type|
field type,
Expand Down
3 changes: 3 additions & 0 deletions app/models/ability.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ def editor_perms
end
can [:create, :update, :read, :destroy], [Account, Source, TiplineNewsletter, TiplineResource, Feed, FeedTeam], :team_id => @context_team.id
can [:create, :update, :destroy], FeedInvitation, { feed: { team_id: @context_team.id } }
can :destroy, FeedTeam do |obj|
obj.team.id == @context_team.id || obj.feed.team.id == @context_team.id
end
can [:cud], AccountSource, source: { team: { team_users: { team_id: @context_team.id }}}
%w(annotation comment dynamic task tag).each do |annotation_type|
can [:cud], annotation_type.classify.constantize do |obj|
Expand Down

0 comments on commit ba5ef8e

Please sign in to comment.