Feedback events take `user` from the request and allow updates to other users' events
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 56/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
调研方向
Start with contentcuration/contentcuration/viewsets/feedback.py, especially the serializers and three viewsets identified in the issue, then read the strategy in issue #6398. Add regression tests for spoofed users and updates to another user's recommendation, interaction, and flag events. Done means the ownership and response-code acceptance criteria pass while users can still create and update their own events.
由索引模型根据 Issue 内容生成。
描述
Overview
The feedback event endpoints take user from the request body, and their update routes accept any event. Any logged-in user can record recommendation events as another user and change another user's recommendation events by id. The flagged-content endpoint has the same shape for users with the test_dev_feature flag.
Complexity: Low
Target branch: hotfixes
Context
BaseFeedbackEventSerializermarksuserread-only, butFlagFeedbackEventSerializerandRecommendationsEventSerializerdeclare their ownMeta, which drops it. Nothing setsuserfrom the request.- The three viewsets use
.objects.all()with no ownership filter. - Reproduced:
POST /api/events/recommendationswith another user's id inuserreturns 201, and the event is recorded as theirs.PATCH /api/events/recommendations/<another user's event id>returns 200 and changes the event.
The Change
usershould be read-only on every feedback event serializer and set fromrequest.user, following the strategy in #6398.- Update routes should only find the requester's own events. Interaction events belong to the requester through their
recommendation_event_id.
Acceptance Criteria
General
- Creating a recommendation or flag event with another user's id in
userrecords the event as the requester's. -
PUTandPATCHon another user's recommendation or interaction event return 404. On another user's flag event they return 404 for users with thetest_dev_featureflag, and 403 as now for users without it. - Users can still create and update their own events.
Testing
- Regression tests cover spoofed
useron create and updates to another user's event, for each event type.
AI usage
I chose which audit findings belong in #6398 and set the access pattern. Claude Code found and reproduced this gap and drafted this issue.
- 主要语言
- Python
- 星标
- 212
- 派生
- 321
- 平均合并
- 1 天 7 小时
- 30 天内合并 PR
- 14
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
learningequality/studio 的其他 Issue
-
Community library status changes don't update `date_updated`可能已有人在做 @LightCreator1007 于 1 天前认领。 未关闭DEV: backend good first issue help wanted
难度 2/5 1-3 小时 新手友好度 84/100
learningequality/studio#6414 · 3 条评论 ·
维护者通常 1 天内回复
-
DEV: backend
难度 2/5 1-3 小时 新手友好度 82/100
learningequality/studio#6410 ·
维护者通常 1 天内回复
-
DEV: backend
难度 2/5 1-3 小时 新手友好度 76/100
learningequality/studio#6409 ·
维护者通常 1 天内回复
-
DEV: backend
难度 2/5 1-3 小时 新手友好度 78/100
learningequality/studio#6407 ·
维护者通常 1 天内回复
-
DEV: backend good first issue help wanted
难度 2/5 1-3 小时 新手友好度 78/100
learningequality/studio#6404 · 1 条评论 ·
维护者通常 1 天内回复
查看 learningequality/studio 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 77/100
canonical/paas-charm#407 · 1 条评论 ·
维护者通常 5 天内回复
-
bug
难度 1/5 1 小时以内 新手友好度 90/100
FAIRmat-NFDI/pynxtools-spm#136 ·
维护者通常 1 天内回复
-
enhancement tooling
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
`read_nexus` entry point points to a function that no longer exists可能已有人在做 @RubelMozumder 今天认领。 未关闭annotator bug
难度 1/5 1 小时以内 新手友好度 88/100
FAIRmat-NFDI/pynxtools#876 · 1 条评论 ·
维护者通常 1 天内回复
-
[Bug]: HTTP 499 (Client Closed Request) is classified as a non-retryable format_error, so a mid-flight abort fails the turn over instead of retrying可能已有人在做 @yipinghuang1991 今天认领。 未关闭comp/agent P2 type/bug
难度 2/5 1-3 小时 新手友好度 82/100
NousResearch/hermes-agent#156837 ·
维护者通常 1 天内回复