Univention Bugzilla – Bug 47691
check for mandatory_attributes doesn't consider attribute contents
Last modified: 2019-02-12 12:13:31 CET
The import has a configuration option "mandatory_attributes" that should check if a user attribute has been set. The documentation states in two places: ---------------------------------------------------------------------------- "mandatory_attributes": list: list of UDM attribute names that must be set by the import ---------------------------------------------------------------------------- Liste mit Univention Directory Manager Attributnamen, die während des Imports aus den Eingabedaten oder indirekt über ein Schema gesetzt werden müssen. ---------------------------------------------------------------------------- The user object validation code however only checks if the attributes exist, but doesn't fail if they are empty.
Fixed in branch dtroeder/47691_mandatory_attributes_contents: ef40da36f: Bug #47691: check properties in config['mandatory_attributes'] exist and are non-empty If a UDM property or User attribute that is listed in config['mandatory_attributes'] does not exist MissingMandatoryAttribute is raised. If a UDM property or User attribute that is listed in config['mandatory_attributes'] exists but is empty ('' or None) EmptyMandatoryAttribute is raised.
Test passes for me and also the Exceptions are raised in run and dry-run when expected. Please build, so I can do final testing.
Thanks for testing. Changelog added, built, advisory.
A test fails now: 90_ucsschool.114_importuser_udm_properties_udm_syntax_checks.test
Here the link for faster access: http://jenkins.knut.univention.de:8080/job/UCSschool-4.3/job/Install%20Singleserver/lastCompletedBuild/Config=s4-all-components,TestGroup=base1/testReport/90_ucsschool/114_importuser_udm_properties_udm_syntax_checks/test/
[4.3] 39d15a5b0 Bug #47691: fix test not setting source_uid ucs-test-ucsschool (5.0.2-97)
Changelog & Advisory: OK Package installs: OK Works: OK (like before) Looks all fine for me now.
UCS@school 4.3 v6 has been released. https://docs.software-univention.de/changelog-ucsschool-4.3v6-de.html If this error occurs again, please clone this bug.