Backport the invitee-only invitation accept and decline check (#5893) to hotfixes
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 1/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 领域
- authentication, backend, testing
调研方向
Read the hotfixes versions of InvitationViewSet.accept and decline in contentcuration/contentcuration/viewsets/invitation.py, then compare them with the fix from #5893 on unstable. Use contentcuration/contentcuration/tests/viewsets/test_invitation.py to check the expected behavior for invitees and other channel users. Done when the tests from #5893 pass on hotfixes and unauthorized attempts leave the invitation unchanged.
由索引模型根据 Issue 内容生成。
描述
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Overview
#5893 restricted the invitation accept and decline actions to the invited user, fixing #5781, but it merged to unstable only. On hotfixes, the sender, editors and viewers of the channel can still accept or decline an invitation on the invitee's behalf. Accepting adds the invitee to the channel without their agreement.
Complexity: Low
Target branch: hotfixes
Context
- On
hotfixes,InvitationViewSet.acceptanddeclineload the invitation withget_object(). Its queryset isInvitation.filter_view_queryset, which includes invitations the user sent and invitations to channels the user edits or views. - The fix is learningequality/studio@073735535 on
unstable, with its tests incontentcuration/contentcuration/tests/viewsets/test_invitation.py.
The Change
- The invitee-only check from #5893 should apply on
hotfixes.
Acceptance Criteria
General
- On
hotfixes, a channel editor, channel viewer or sender who isn't the invitee gets the same response fromacceptanddeclineas they do onunstableafter #5893, and the invitation is unchanged. - The invitee can still accept and decline.
Testing
- The tests added in #5893 pass on
hotfixes.
AI usage
I decided this needs a backport. Claude Code found that #5893 isn't on hotfixes 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`可能已有人在做 @ArpitaSamanta10 今天认领。 未关闭community-contribution-in-progress DEV: backend good first issue help wanted
难度 2/5 1-3 小时 新手友好度 84/100
learningequality/studio#6414 · 8 条评论 · 已指派 1 人 ·
维护者通常 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 天内回复
-
Stripe webhook accepts events when no webhook secret is configured可能已有人在做 @adibmbrk 今天认领。 未关闭community-contribution-in-progress DEV: backend good first issue help wanted
难度 2/5 1-3 小时 新手友好度 78/100
learningequality/studio#6404 · 3 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 learningequality/studio 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 2 天内回复
-
audit-reference-check
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
site-bug triage
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 77/100
canonical/paas-charm#407 · 1 条评论 ·
维护者通常 5 天内回复