Bug 54021 - remove UCS@school code from UDM hook
remove UCS@school code from UDM hook
Status: NEW
Product: UCS@school
Classification: Unclassified
Component: General
UCS@school 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS@school maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-11-02 07:42 CET by Daniel Tröder
Modified: 2023-06-23 13:20 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

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Tröder univentionstaff 2021-11-02 07:42:53 CET
The UDM hook ucs-school-import/udm_hook/ucsschool_role_computers.py uses ucsschool.lib code, when it is installed. (If the the ucsschool.lib is not installed it does nothing.)

Loading ucsschool code inside UDM - on which ucsschool is based - is a layer violation.

Replace the ucsschool.lib code in the UDM hook with LDAP/UDM calls.

IMHO it's OK to duplicate simple code / constants (like "role_linux_computer" or "create_ucsschool_role_string") to not depend on the ucsschool.lib package anymore. If done, add comments in both places (origin and hook) to keep both in sync.