Univention Bugzilla – Bug 54126
Add expiration date field to User in Kelvin API
Last modified: 2021-11-29 15:17:07 CET
+++ This bug was initially created as a clone of Bug #54116 +++ +++ This bug was initially created as a clone of Bug #54115 +++ Add a field "expiration_date" to the user resource in the Kelvin REST API. It should be handled by the code in the ucsschool.lib, ported from 5.0.
As a workaround for Bug 54152 we are implemented: value = int(time.mktime(time.strptime("2021-11-25", "%Y-%m-%d")) // 3600 // 24 + 1) # -> value == 18956 And then using as filter "shadowExpire=18956" instead of "shadowExpire=2021-11-25".
As a workaround for Bug 54159 we are implementing that searches in the Kelvin user resource with "disabled=true/false" are converted to UDM REST API searches with "disabled=1/0".
Support for the expiration_date field was added to the ucsschool.lib and Kelvin. [feature/kelvin] de7969b1c Bug #54126: add expiration_date field to ucsschool.lib User model [feature/kelvin] 729ec6f1d Bug #54126: improve tests [feature/kelvin] 1944e8b80 Bug #54126: add expiration_date field to user resource [feature/kelvin] 178ffb8e2 Bug #54126: improve logging A new Docker image (1.5.1) has been build.
The test tests/test_route_user.py::test_create was flaky, because it seems that after setting the UDM property "disabled" something goes on (s4 ping pong?) before the LDAP attribute shadowExpire is set correctly. [feature/kelvin d76f9c0bf] Bug #54126: fix test: wait for udm/disabled -> ldap/shadowExpire A new Docker image (1.5.1) has been build.
OK: installation/upgrade of/to 1.5.1 OK: jenkins 5.0 (https://jenkins.knut.univention.de:8181/job/UCSschool-5.0/job/kelvin%20API/) ~OK: jenkins 4.4 https://jenkins.knut.univention.de:8181/job/UCSschool-4.4/job/HTTP-APIs%20tests/ 94_ucsschool-api-kelvin.10_in_container_tests_kelvin_api.master is flaky in jenkins -- works manually OK: manual test of user resource (GET/POST/PUT/PATCH) OK: code review OK: changelogs OK: version number OK: all manual tests for 4.4 and 5.0 -> verified