Univention Bugzilla – Bug 41775
ucs-school-import: --no-delete option prevents explicitly desired deletion
Last modified: 2016-10-04 13:24:53 CEST
If the input data contains a column that explicitly sets "action=D" for an ImportUser, than the user should be deleted. Currently a check for "no-delete" in UserImport.delete_users() prevents any deletion of users. This is needed for the new operation mode "change user database according to this input" (previously the only operation mode was "change user database to this target state").
Fixed in r70936 Advisory (build number): r70937
Write a test.
added a test in r71279
Fixed test and notifier handling in r 71286, 71287, 71288. (Fixing notifier shutdown for jenkins failing on 90_ucsschool/34_import-users_via_cli: http://jenkins.knut.univention.de:8080/job/UCSschool%204.1/job/UCSschool%204.1%20(R2)%20Singleserver/SambaVersion=s3/184/testReport/junit/90_ucsschool/34_import-users_via_cli/test/ )
The test does not test the case where an explicitly desired deletion is in the CSV file (like in a legacy CSV file) and did thus not show, that the code currently does actually not allow it.
Fixed in r71302. Unfortunately the new code is almost a copy of LegacyUserImport.detect_users_to_delete(), but because of some self-references in detect_users_to_delete(), using that method in the non-legacy UserImport would have made subclassing it confusing, if not unsafe. Added a test, forcing action=D in import with --no-delete: r71306.
ucs-school-lib: OK: code change OK: functional test OK: ucs-test OK: YAML has been updated ucs-school-import: OK: code change + reworded cmdline help OK: functional test OK: ucs-test OK: YAML has been updated Package: ucs-school-import Version: 14.0.16-1.301.201608241442 Package: ucs-test-ucsschool Version: 3.0.14-13.250.201608241442 ucs-school-lib.yaml: r71902 | Bug #41775: updated advisory ucs-school-import (14.0.16-1): r71903 | Bug #41775: reworded cmdline description ucs-test-ucsschool (3.0.14-13): r71905 | Bug #41775: renamed 1 function/ 1 variable for better readability ucs-school-import.yaml: r71904 | Bug #41775: updated advisory A final jenkins run is missing.
Waiting for 34_import-users_via_cli_v2.test...
This is tested in 34_import-users_via_cli_v2 in methods test_create_modify_only() and test_no_delete_option().
(In reply to Sönke Schwardt-Krummrich from comment #8) > Waiting for 34_import-users_via_cli_v2.test... Test was several times successful. → VERIFIED
UCS@school 4.1 R2 v5 has been released. http://docs.software-univention.de/changelog-ucsschool-4.1R2v5-de.html If this error occurs again, please clone this bug.