-
Notifications
You must be signed in to change notification settings - Fork 85
Closed
Milestone
Description
Problem
See #1286 for an explanation of how a Message system works.
Once we have created a Message and it's associated Conversation, any side of the conversation can post a reply.
Each of these replies then creates a ConversationPart containing its contents.
Since we will be fetching ConversationPart records asynchronously, we need to have a show endpoint.
Subtasks
- implement
Policy.ConversationPart.show?current_useris authorized ifcurrent_user.id==record.author_idcurrent_useris authorized ifcurrent_user.id==record.conversation.user_idcurrent_useris authorized ifcurrent_user.id==record.conversation.message.author_idcurrent_useris authorized if admin or higher onrecord.conversation.message.project
- write tests for
Policy.ConversationPart.show? - implement
ConversationPartController:showendpoint- fetches by id
- authorizes using policy
- write tests for
:showendpoint