Univention Bugzilla – Bug 52787
Do not list exam users when searching with the Kelvin API
Last modified: 2021-02-23 09:29:59 CET
When listing/searching UCS@school users using the Kelvin API, exam users are also listed. This should not be the case, as they are temporary objects exclusively for the exam mode that should not be meddled with. They may also confuse API users. But being real UCS@school user objects, API users should be able to retrieve them, when they so desire explictely. * resource list operation -> no exam users included * resource get operation -> exam user can be requested
When no role is provided, exam users are not included anymore. They can still be retrieved explictely. Tests for both features are included: [feature/kelvin] ae192b145 Bug #52787: exam users are not included in searches anymore, but can be retrieved explicitely
QA → All OK, already in feature/kelvin → VERIFY * resource list operation → no exam users included * resource get operation → exam user can be requested → sounds good to me. Code → looks good. curl -X GET "http://$host/ucsschool/kelvin/v1/users/?school=DEMOSCHOOL" -H "accept: application/json" -H "Authorization: Bearer $token" → no exam users included curl -X GET "http://10.200.47.12/ucsschool/kelvin/v1/users/exam-demo_student" -H "accept: application/json" -H "Authorization: Bearer $token" → returns exam user with name exam-demo_student Tests → passing, including new tests: tests/test_route_user.py::test_search_returns_no_exam_user PASSED tests/test_route_user.py::test_get_returns_exam_user PASSED
A Kelvin API app with the changes in this bug has been published.