Bug 47027 - [4.3] ucs-school-import: Attributes of ImportUser.old_user updated to new user
[4.3] ucs-school-import: Attributes of ImportUser.old_user updated to new user
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: Import scripts
UCS@school 4.2
Other Linux
: P5 normal (vote)
: UCS@school 4.3 v4
Assigned To: Daniel Tröder
Sönke Schwardt-Krummrich
:
Depends on:
Blocks: 47028
  Show dependency treegraph
 
Reported: 2018-05-17 14:58 CEST by Daniel Tröder
Modified: 2018-07-04 18:09 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 2: Will only affect a 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.069
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Tröder univentionstaff 2018-05-17 14:58:09 CEST
When modifying an existing user during an import, the attribute "old_user" of ImportUser objects should be the unmodified ImportUser object loaded from LDAP. It is however updated with input data (from a CSV file). Hooks and other code can thus not compare the old user object and the new one.
Comment 2 Daniel Tröder univentionstaff 2018-05-17 16:41:26 CEST
A copy of the user object loaded from LDAP is now created for "old_user", before updating it with data from input.

[4.3] 1fcae79e Bug #47027: fix old_user attributes being overwritten
[4.3] cc08054d Bug #47027: changelog
[4.3] 78016d0c Bug #47027: advisory
Comment 3 Sönke Schwardt-Krummrich univentionstaff 2018-05-31 18:05:37 CEST
OK: code change
OK: functional test
OK: ucs-test
OK: advisory

Added a ucs-test script:
[4.3 2250fe420] Bug #47027: added 234_modify_user_data_in_pyhooks
Comment 4 Sönke Schwardt-Krummrich univentionstaff 2018-07-04 18:09:00 CEST
UCS@school 4.3 v4 has been released.

https://docs.software-univention.de/changelog-ucsschool-4.3v4-de.html

If this error occurs again, please clone this bug.