Bug 54474 - searching for users' udm mapped properties passes incomplete search filter
Summary: searching for users' udm mapped properties passes incomplete search filter
Status: CLOSED FIXED
Alias: None
Product: UCS@school
Classification: Unclassified
Component: HTTP-API (Kelvin)
Version: UCS@school 5.0
Hardware: Other Linux
: P5 normal
Target Milestone: ---
Assignee: Tobias Wenzel
QA Contact: Daniel Tröder
URL: https://git.knut.univention.de/univen...
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-21 12:56 CET by Tobias Wenzel
Modified: 2022-03-03 16:09 CET (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.057
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Customer ID:
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Wenzel univentionstaff 2022-02-21 12:56:37 CET
When searching for users by UDM mapped properties, the accepted properties are only the users' properties of the import config, not of the 

/etc/ucsschool/kelvin/mapped_udm_properties.json

Because of that, the search filter is incomplete and all users are returned.


.......................


This can be easily fixed by adjusting the user.py (router) in kelvin.

@lru_cache(maxsize=1)
def accepted_udm_properties() -> Set[str]:
    return set(ImportUser._attributes.keys()).union(
        set(get_import_config().get("mapped_udm_properties", [])),
        set(getattr(UDM_MAPPING_CONFIG, "user", []))
    )
Comment 1 Tobias Wenzel univentionstaff 2022-02-21 13:03:52 CET
A patch is available here:

https://git.knut.univention.de/univention/ucsschool/-/merge_requests/79
Comment 2 Daniel Tröder univentionstaff 2022-02-21 13:21:54 CET
Please
* add the comma
* merge
* build the Docker image
* update the 3 changelogs
* create a new app in the test appcenter
Comment 4 Tobias Wenzel univentionstaff 2022-02-21 14:14:38 CET
Thanks for the super-quick QA!

- added comma
- merged
- rebuild the version 1.5.3
- adapted changelog


[feature/kelvin] 9f52dd14b Bug #54474: changelog
[feature/kelvin] 87a3a7695 Bug #54474: accepted udm properties includes values of mapped_udm_properties.json

1.5.3: digest: sha256:45a3c6c5de25a6d3db6e040add2c5cc6f08356dbc49614d81e5117847b47740e size: 3461
Comment 5 Daniel Tröder univentionstaff 2022-02-21 14:52:24 CET
OK: code change
OK: changelog
OK: manual test
Comment 6 Tobias Wenzel univentionstaff 2022-03-03 16:09:00 CET
Released with version 1.5.3

If error occurs again, please clone this bug.