Bug 53674 - Renaming a user calls hook_ldap_pre_modify only after the action
Renaming a user calls hook_ldap_pre_modify only after the action
Status: RESOLVED MOVED
Product: UCS
Classification: Unclassified
Component: UDM (Generic)
UCS 4.4
Other Linux
: P5 normal (vote)
: UCS 5.0-0-errata
Assigned To: Florian Best
Arvid Requate
https://git.knut.univention.de/univen...
:
Depends on:
Blocks: 53727
  Show dependency treegraph
 
Reported: 2021-08-18 22:25 CEST by Arvid Requate
Modified: 2022-06-23 12:31 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
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
patch (git:fbest/53674-udm-rename-hook) (2.36 KB, patch)
2021-08-19 13:14 CEST, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2021-08-18 22:25:09 CEST
In handlers/__init__.py the hook "hook_ldap_pre_modify" is called after self._ldap_pre_modify(). In the case of the users/user module this has the consequence, that a user rename happens before the "hook_ldap_pre_modify" has a chance to intervene in any way.
Comment 1 Florian Best univentionstaff 2021-08-18 22:36:22 CEST
Sounds like a regression from Bug #53102.
Maybe we should add a new hook `hook_ldap_pre_rename()` ?!
Comment 2 Arvid Requate univentionstaff 2021-08-18 22:45:15 CEST
A hook_ldap_pre_move would be nice, yes.

But I'm not facing a regression from Bug #53102 here, because the CI system currently has

root@sandbox-200:~# univention-app info
UCS: 4.4-7 errata829
Comment 3 Florian Best univentionstaff 2021-08-19 13:14:25 CEST
Created attachment 10806 [details]
patch (git:fbest/53674-udm-rename-hook)