Skip to content

feat: add endpoint for user created calibrations#689

Draft
bencap wants to merge 1 commit intorelease-2026.1.2from
feature/bencap/688/score-calibration-me-endpoint
Draft

feat: add endpoint for user created calibrations#689
bencap wants to merge 1 commit intorelease-2026.1.2from
feature/bencap/688/score-calibration-me-endpoint

Conversation

@bencap
Copy link
Collaborator

@bencap bencap commented Mar 19, 2026

This pull request adds a new API endpoint for users to list their own score calibrations and introduces comprehensive tests to ensure correct behavior and access control. The changes enhance user experience by allowing authenticated users to retrieve their calibrations and improve code coverage for this feature.

API Enhancements:

  • Added a new GET /score-calibrations/me endpoint in score_calibrations.py that allows authenticated users to list all score calibrations they have created. This endpoint requires authentication and returns a list of calibrations associated with the current user.

Testing and Access Control:

  • Added multiple tests in test_score_calibrations.py to verify:
    • Anonymous users cannot access the new endpoint (receive 401).
    • Authenticated users with no calibrations receive an empty list.
    • Users can see only their own calibrations, not those of other users.
    • Users see calibrations across multiple score sets if applicable.

@bencap bencap linked an issue Mar 19, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GET /users/me/calibrations endpoint

1 participant