Bug 49556 - ImportUser doesn't execute shell hooks if used without import job
ImportUser doesn't execute shell hooks if used without import job
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: Import scripts
UCS@school 4.4
Other Linux
: P5 normal (vote)
: UCS@school 4.4 v2-errata
Assigned To: Daniel Tröder
Jürn Brodersen
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-05-27 16:25 CEST by Daniel Tröder
Modified: 2019-06-26 14:19 CEST (History)
0 users

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?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
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 2019-05-27 16:25:28 CEST
When used directly (not as part of an import job), ImportUser.build_hook_line() will return None, because self.input_data is empty.
Comment 1 Daniel Tröder univentionstaff 2019-05-27 16:50:51 CEST
This fixes it:

[dtroeder/49556_ImportUser_hooks_without_import 9cf157da0] Bug #49556: run shell hooks when ImportUser is used without an import job

ucs-test that fails without above patch:

[4.4 ca2b98e81] Bug #49556: check execution of shell hooks

QA: please reopen for merge and build.
Comment 2 Daniel Tröder univentionstaff 2019-06-18 10:42:12 CEST
Code change was merged into 4.4 to fix failing test 90_ucsschool/82_legacy_hooks.

[4.4] 9c36b5d0a Bug #49556: run shell hooks when ImportUser is used without an import job
[4.4] ddc16eb0e Bug #49556: Merge branch 'dtroeder/49556_ImportUser_hooks_without_import' into 4.4
[4.4] bab11c724 Bug #49556: changelog, advisory
[4.4] ebe1826a0 Bug #49556: advisory update

ucs-school-import (17.0.6-22)
Comment 3 Jürn Brodersen univentionstaff 2019-06-18 14:56:16 CEST
What I tested:
82_legacy_hooks -> OK
201_import-users_basic -> OK

YAML -> OK

Verified
Comment 4 Sönke Schwardt-Krummrich univentionstaff 2019-06-26 14:19:23 CEST
UCS@school 4.4 v2 has been released.

https://docs.software-univention.de/changelog-ucsschool-4.4v2-de.html

If this error occurs again, please clone this bug.