Bug 57208 - Hook `ext_config_dep_on_role.py` does not support role `teacher_and_staff`.
Hook `ext_config_dep_on_role.py` does not support role `teacher_and_staff`.
Status: NEW
Product: UCS@school
Classification: Unclassified
Component: Import scripts
UCS@school 5.0
Other Linux
: P5 normal (vote)
: UCS@school 5.0 v5-errata
Assigned To: UCS@school maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2024-04-03 16:36 CEST by Johannes Königer
Modified: 2024-04-23 10:20 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: 2024040321000153
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 Johannes Königer univentionstaff 2024-04-03 16:36:58 CEST
The hook `ext_config_dep_on_role.py` does not support the role `teacher_and_staff`. As we support importing that role generally, this hook should also work with this role.

The test `90_ucsschool/246_import_user_config_pyhook.py` fails while loading the configuration, but passes anyway:

```
2024-04-03 15:33:19 INFO  import_pyhook.call_hooks:165  Running ImportPyHookLoader post_config_files_read hook <bound method ExtendConfigByRole.post_config_files_read of <test246_config_modification.ExtendConfigByRole object at 0x7f598426a780>> ...
2024-04-03 15:33:19 ERROR test246_config_modification.preconditions_met:127  Exiting hook: unknown role 'teacher_and_staff'.
```

We need to add `teacher_and_staff` to the supported roles of the hook and review/rework the test.