fix!: supply the editor and closing user as separate params to cs_comments_service (#30230)
The forum service doesn't get the requesting user id for any operation, only the user id of the content creator. So to apply a different user id for an editor or post closing user, those need to be explicitly passed.
This commit is contained in:
@@ -20,6 +20,7 @@ class Comment(models.Model):
|
||||
updatable_fields = [
|
||||
'body', 'anonymous', 'anonymous_to_peers', 'course_id', 'closed',
|
||||
'user_id', 'endorsed', 'endorsement_user_id', 'edit_reason_code',
|
||||
'closing_user_id', 'editing_user_id',
|
||||
]
|
||||
|
||||
initializable_fields = updatable_fields
|
||||
|
||||
@@ -28,7 +28,7 @@ class Thread(models.Model):
|
||||
updatable_fields = [
|
||||
'title', 'body', 'anonymous', 'anonymous_to_peers', 'course_id', 'read',
|
||||
'closed', 'user_id', 'commentable_id', 'group_id', 'group_name', 'pinned', 'thread_type',
|
||||
'close_reason_code', 'edit_reason_code',
|
||||
'close_reason_code', 'edit_reason_code', 'closing_user_id', 'editing_user_id',
|
||||
]
|
||||
|
||||
# metric_tag_fields are used by Datadog to record metrics about the model
|
||||
|
||||
Reference in New Issue
Block a user