Univention Bugzilla – Bug 50797
Searches in school umc modules do not use wildcards "*" around the search pattern
Last modified: 2022-07-15 08:31:08 CEST
Searches in school umc modules do not use wildcards "*" around the search pattern This is inconsistent compared to searches in udm modules. This also means that searches for classes or workgroups need to start with an asterisk or the right school prefix to find them. The "LDAPSearchSanitizer" decorator can be used to add asterisk to the search pattern. Notes: - Always adding the school prefix was removed in bug 29830. - The "LDAPSearchSanitizer" only adds wildcards if none wasn't explicitly given in the pattern. That means that a search for the group "mySchool-hasen" using "hasen" would work but "h*" wouldn't.
This is a regression introduced by bug 47418. commit: "482f8ce5adf2d06a202e3a2c6ca0a1074b8043a4" removes the "LDAPSearchSanitizer" from ucs-school-lib/python/models/base.py which was responsible for adding the "*" around the search pattern.
*** Bug 54121 has been marked as a duplicate of this bug. ***
Next customer reported that problem
QA: - TODO advisory (can be done in 5.0) - TODO will verify after jenkins happy - OK code ok see !117 - OK changelog (can be done in 5.0) - OK manual qa ---Manual QA--- **OK Classes (schools)** created two school classes 1a + 1b - `*` -> returns all - (none) returns all - 1 -> returns 1a, 1b - 1* -> returns 1a, 1b - DEMOSCHOOL-1* -> returns nothing - now fixed -> when opening the module i am displayed: no class exists **OK Administrate workgroups** created two workgroups: test1+test2 - `*` -> returns all - (none) returns all - test -> returns test1, test2 - test* -> returns test1, test2 **OK users (schools)** - `*` -> returns all - (none) returns all - ali -> Alita Wex - ali* -> Alita Wex - ar -> Adelhard L..., Arthur ... (in the middle) - ar* -> Arthur **OK Rechner (Schulen)** - `*` -> returns nothing - (none) returns nothing - win -> returns nothing - win* -> returns nothing **OK Verwaltung von Schulen** - `*` -> returns all - (none) return all - de -> Demoschool - de* -> Demoschool **OK Passwörter (*)** - `*` -> returns all - (none) return all - ar -> Adelhard L..., Arthur ... - ar* -> Arthur - me -> returns multiple users (in the middle) **OK Computerräume verwalten** - `*` -> returns all - (none) return all - room -> room0, room1 - room* -> returns nothing - school1-room* -> room0, room1 - Emtpy search yield a dialogue to create a room, I think this is another issue. Please check if there is an open bug for that: If not: create it ** Klassen zuordnen** - `*` -> returns all teachers in selected school - (none) return all teachers in selected school - de -> returns all teachers with de in selected school - de* -> returns all teachers with de in selected school **OK Lehrer zuordnen** - `*` -> returns all - (none) return all - de -> returns demo* classes - de* -> returns demo* classes **OK Internetregeln zuweisen** - `*` -> returns all - (none) return all - demo* -> demo-classes + work-groups at demoschool (democlass, test1, ...) + DEMOSCHOOL-import-all - demo* -> demo-classes + work-groups at demoschool (democlass, test1, ...) + DEMOSCHOOL-import-all + domain users, lehrer, schueler, lehrer - Demoschool-Dem* -> still returns nothing One thing: `DEMOSCHOOl-import-all` can be found with `*` or any empty string, but not while searching for it directly - but I don't think it should be listed here anyway. I'm not sure if it's worth implementing another workaround for this.
I improved the advisory texts a little bit [5.0] caefd36aa Bug #50797: improve advisory texts Successful build Package: ucs-school-umc-wizards Version: 12.0.10A~5.0.0.202207071456 Branch: ucs_5.0-0 Scope: ucs-school-5.0 Successful build Package: ucs-school-umc-users Version: 16.0.5A~5.0.0.202207071454 Branch: ucs_5.0-0 Scope: ucs-school-5.0 Successful build Package: ucs-school-umc-rooms Version: 17.0.9A~5.0.0.202207071451 Branch: ucs_5.0-0 Scope: ucs-school-5.0 Successful build Package: ucs-school-umc-internetrules Version: 16.0.3A~5.0.0.202207071448 Branch: ucs_5.0-0 Scope: ucs-school-5.0 Successful build Package: ucs-school-umc-groups Version: 10.0.7A~5.0.0.202207071445 Branch: ucs_5.0-0 Scope: ucs-school-5.0 Successful build Package: ucs-school-lib Version: 13.0.19A~5.0.0.202207071332 Branch: ucs_5.0-0 Scope: ucs-school-5.0
Jenkins is happy -> verify
UCS@school 5.0 v2 has been released. https://docs.software-univention.de/changelog-ucsschool-5.0v2-de.html If this error occurs again, please clone this bug.