Feedback events take `user` from the request and allow updates to other users' events
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 56/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Domínio
- authentication, backend-api-design, security
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Python
- Estrelas
- 212
- Forks
- 321
- Merge médio
- 1d 7h
- PRs com merge (30d)
- 14
Preparar o ambiente
- Inclui um Dockerfile ou arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de learningequality/studio
-
Community library status changes don't update `date_updated`Talvez já em andamento @ArpitaSamanta10 assumiu hoje. Abertacommunity-contribution-in-progress DEV: backend good first issue help wanted
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
learningequality/studio#6414 · 8 comentários · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
DEV: backend
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
learningequality/studio#6410 ·
Mantenedores costumam responder em até 1 dia
-
DEV: backend
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
learningequality/studio#6409 ·
Mantenedores costumam responder em até 1 dia
-
DEV: backend
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
learningequality/studio#6407 ·
Mantenedores costumam responder em até 1 dia
-
Stripe webhook accepts events when no webhook secret is configuredTalvez já em andamento @adibmbrk assumiu hoje. Abertacommunity-contribution-in-progress DEV: backend good first issue help wanted
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
learningequality/studio#6404 · 3 comentários · 1 responsável ·
Mantenedores costumam responder em até 1 dia
Todas as issues de learningequality/studio
Issues semelhantes
-
area: ci bug good first issue help wanted
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
hffgzktbcc-blip/ounce-core#484 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
ranxianglei/billion-context#7063 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
-
needs-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
MakazhanAlpamys/Soup#2971 ·
Mantenedores costumam responder em até 1 dia