PrevEmployment: add auth + ownership check to PATCH/DELETE/proof endpoints
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 66/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Área
- api, authentication, authorization, testing
Línea de trabajo
Start with api/routers/prev_employment.py and inspect how get_current_student and the ownership check are used for the related issue #138. Apply the same authentication and 404 behavior to the three listed endpoints, then add integration tests for unauthenticated, other-user, and owner requests. Done means all three endpoint cases behave as specified.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
These endpoints in api/routers/prev_employment.py have no auth dependency and do no ownership check, so anyone can modify, delete or upload proof for any previous-employment entry by id:
PATCH /prev_employments/{prev_employment_id}/proofDELETE /prev_employments/{prev_employment_id}PATCH /prev_employments/{prev_employment_id}
Tasks
- Require
get_current_student - Ownership check: entry must have
user_account == user["sub"]; otherwise 404 (no existence leak, consistent with #138) - Integration tests: unauthenticated → 401; other user's entry → 404; owner → success
Related: #138
- Lenguaje dominante
- Python
- Estrellas
- 0
- Forks
- 0
- Merge medio
- 39 min
- PR fusionados (30 d)
- 10
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Sin 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 ClockGU/clockwork-backend
-
Add alembic upgrade predeployAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
ClockGU/clockwork-backend#169 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 20/100
ClockGU/clockwork-backend#165 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
ClockGU/clockwork-backend#164 ·
Los mantenedores suelen responder en 1 día
-
[#160] Refactor EmployeeManagerAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
ClockGU/clockwork-backend#163 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
ClockGU/clockwork-backend#162 ·
Los mantenedores suelen responder en 1 día
Todos los issues de ClockGU/clockwork-backend
Issues similares
-
getchaintips leaves out the active tip once a header is staged on it, where Core always lists itAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
btclib-org/btclib-node#2158 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
dbt-msft/dbt-sqlserver#897 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Gathin23/cleanyourtv#2770 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
vllm-project/vllm#64845 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
dekobon/big-code-analysis#1729 ·
Los mantenedores suelen responder en 1 día