Univention Bugzilla – Bug 49492
Typo in schoolusers.js prevents listing of users in Reset Password module
Last modified: 2019-05-29 14:04:52 CEST
See also https://help.univention.com/t/12005/ Under certain circumstances, the list of users is not shown in the password reset UMC modules of UCS@school. Debugging this during a workshop revealed that the query succeeds and all users are sent in the JSON reply to the frontend, but the grid list remains empty. The developer tools of the browser show a JS error: > ReferenceError: "isNan is not defined" > Formatter Choo > Dojo 60 The problem seems to be a typo in schoolusers.js ("isNan" vs. "isNaN") while checking the password expiry date. I will attach a patch that fixed the problem on the UCS master of the customer environment. FYI: I'm not sure why this code path was taken in the customer environment (test environment was fine). However, the consequence was that it was not possible to reset passwords as teacher or school-admin.
Created attachment 10033 [details] hotfix patch
Package: ucs-school-umc-users Version: 15.0.0-3A~4.4.0.201905230838 Branch: ucs_4.4-0 Scope: ucs-school-4.4 The patch was applied. If I read the code correctly the error should be reproducible by creating a User with a valid expiration date. In this case the code traverses through the if else construct and reaches the faulty code.
To reproduce it I had to set the "passwordexpiry" property to later than "today", which cannot be done with UDM (valueMayNotChange Exception). By setting an LDAP editor I raised shadowMax from 1 to 3, which raised "passwordexpiry" in UDM to "tomorrow". Listing a school for the teacher password reset then shows no users anymore (but still the total number). Updating from ucs-school-umc-users_15.0.0-2 to ucs-school-umc-users_15.0.0-3 (and purging the browser cache) fixed the display error.
UCS@school 4.4 v2 has been released. https://docs.software-univention.de/changelog-ucsschool-4.4v2-de.html If this error occurs again, please clone this bug.