Univention Bugzilla – Bug 54653
[Kelvin] make validation of ucsschool roles more robust
Last modified: 2022-06-24 08:36:49 CEST
+++ This bug was initially created as a clone of Bug #54535 +++ ucsschool-roles with a format other than role:school:context will raise errors, e.g. in the umc Interner Server-Fehler in "schoolwizards/users/query (schoolwizards/users)". Request: schoolwizards/users/query (schoolwizards/users) ucsschool/lib/models/validator.py errors.append(cls.validate_part_of_school(roles, schools)) File "/usr/lib/python2.7/dist-packages/ucsschool/lib/models/validator.py", line 228, in validate_part_of_school missing_schools = set([s for r, c, s in roles if c == "school" and s.lower() not in schools]) ValueError: need more than 2 values to unpack These errors come from an incorrect of the school role, but we should log an error with a better description of whats wrong. ... e.g. the function split_roles could be refactored into one of the validation classes, log and a) return only values as tuples (r,c,s) or b) return an empty list. The changes have to be implemented for the Kelvin API as well!
QA: - changelog ok - merge ok [main] e3a1a458 Bug #54653: invalid ucsschool-roles don't crash the validation - pipeline green will verify after jenkins is happy.
qa: all ok jenkins is happy -> verify
Released with 1.5.5 -> closing this issue.