Contentnode `requisites` action skips the permission check
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- authorization, backend
Línea de trabajo
Lee ContentNodeViewSet.requisites en contentcuration/contentcuration/viewsets/contentnode.py y sigue el patrón de acceso de get_object() en el issue #6398. Añade pruebas de regresión para un usuario que no es miembro, un usuario con permiso de visualización y un nodo inexistente; confirma que los usuarios que no son miembros reciben 404, mientras que los usuarios con permiso de visualización conservan la respuesta existente.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
🙂 Looking for an issue? Welcome! This issue is open for contribution. If this is the first time you’re requesting an issue, please:
- Read Contributing guidelines carefully. Pay extra attention to Using generative AI. Pull requests and comments that don’t follow the guidelines won’t be answered.
- Confirm that you’ve read the guidelines in your comment.
Overview
The contentnode requisites action finds the node's tree with ContentNode.filter_by_pk rather than get_object(). Any logged-in user can read the prerequisite relationships of a channel tree they can't view, given the id of a node in it.
Complexity: Low
Target branch: hotfixes
Context
ContentNodeViewSet.requisitesfiltersPrerequisiteContentRelationshipby the tree of the unscoped node.- Reproduced: a logged-in user with no access to a private channel gets 200 with every target/prerequisite id pair in its tree from
GET /api/contentnode/<id>/requisites.
The Change
requisitesshould load the node throughget_object(), following the strategy in #6398, and take the tree from that node.
Acceptance Criteria
General
- A logged-in user who can't view the node gets 404 from
GET /api/contentnode/<id>/requisites, the same as for a nonexistent id. - Editors and viewers of the channel get the same response as before.
Testing
- Regression tests cover a non-member, a viewer and a nonexistent id.
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.
- Lenguaje dominante
- Python
- Estrellas
- 212
- Forks
- 321
- Merge medio
- 1 d 7 h
- PR fusionados (30 d)
- 14
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de learningequality/studio
-
Community library status changes don't update `date_updated`Posiblemente ocupada @ArpitaSamanta10 la tomó hoy. Abiertocommunity-contribution-in-progress DEV: backend good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
learningequality/studio#6414 · 8 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
DEV: backend
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
learningequality/studio#6410 ·
Los mantenedores suelen responder en 1 día
-
DEV: backend
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
learningequality/studio#6409 ·
Los mantenedores suelen responder en 1 día
-
DEV: backend
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
learningequality/studio#6407 ·
Los mantenedores suelen responder en 1 día
-
Stripe webhook accepts events when no webhook secret is configuredPosiblemente ocupada @adibmbrk la tomó hoy. Abiertocommunity-contribution-in-progress DEV: backend good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
learningequality/studio#6404 · 3 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de learningequality/studio
Issues similares
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 76/100
samuelclay/NewsBlur#2214 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
MODEL_NOT_FOUND gives no suggestion for a model listed only as model:profilePosiblemente ocupada @ShaiShmuel la tomó hoy. Abiertoenhancement rust
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
superlinked/sie#985 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
readthedocs/readthedocs-builder#73 ·
Los mantenedores suelen responder en 1 día