Bug 52035 - map email related groups/group properties in ucsschool.libs WorkGroup model
map email related groups/group properties in ucsschool.libs WorkGroup model
Product: UCS@school
Classification: Unclassified
Component: Ucsschool-lib
UCS@school 4.4
Other Linux
: P5 normal (vote)
: UCS@school 4.4 v7
Assigned To: Daniel Tröder
Tobias Wenzel
Depends on:
Blocks: 52050
  Show dependency treegraph
Reported: 2020-09-16 09:34 CEST by Daniel Tröder
Modified: 2020-10-12 16:18 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Feature Request
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:


Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Tröder univentionstaff 2020-09-16 09:34:46 CEST
Make the properties "mailAddress", "allowedEmailUsers" and "allowedEmailGroups" of UDM groups/group objects available as attributes in the WorkGroup class of the ucsschool.lib.
Comment 1 Daniel Tröder univentionstaff 2020-09-17 09:29:20 CEST
The UDM group properties "mailAddress", "allowedEmailUsers" and "allowedEmailGroups" have been made available as the attributes "email", "allowed_email_senders_users" and "allowed_email_senders_groups" for the WorkGroup class.

Tests have been written to check the create, read, update and delete operations on WorkGroup objects.

The code is in the git branch "dtroeder/52035_email_in_lib_workgroup". Commits:

bef93c68d Bug #52035: improve type hints
460877153 Bug #52035: map email related UDM group properties in WorkGroup
d14932a29 Bug #52035: allow to create a school class without a share
948f57570 Bug #52035: test CRUD operations on WorkGroup

root@m150:~# python -m ucsschool.lib.models list-models --attributes
    name [required]
    school [required]

Reopen/Tell me for merge and build.
IMHO this can be published as errata, as it does not interfere with existing installations.
Comment 2 Tobias Wenzel univentionstaff 2020-09-17 11:48:32 CEST
QA -> All OK, REOPEN for merge & build

improve type hints -> OK
map email related UDM group properties in Workgroup -> OK
allow to create a school class without a share -> OK
test crud operations on Workgroup -> OK

Tests pass on my VM -> OK
Manual QA

wg with share -> share is created, allowedEmailUsers, mailAddress & allowedEmailGroups are set as expected.
wg without share -> no share is created, allowedEmailUsers, mailAddress & allowedEmailGroups are set as expected.

udm groups/group list --filter "cn=e6f-WG3" | egrep "allowedEmailGroups:|allowedEmailUsers:|mailAddress:"
  allowedEmailGroups: cn=e6f-WG3,cn=klassen,cn=schueler,cn=groups,ou=e6f,dc=wenzel-univention,dc=intranet
  allowedEmailUsers: uid=demo_student,cn=schueler,cn=users,ou=DEMOSCHOOL,dc=wenzel-univention,dc=intranet
  mailAddress: e6f-WG3@wenzel-univention.intranet

univention-ldapsearch "-b cn=e6f-WG3,cn=schueler,cn=groups,ou=e6f,dc=wenzel-univention,dc=intranet" | egrep 'univentionAllowedEmailGroups:|mailPrimaryAddress:|univentionAllowedEmailUsers:'
univentionAllowedEmailUsers: uid=demo_student,cn=schueler,cn=users,ou=DEMOSCHOOL,dc=wenzel-univention,dc=intranet
univentionAllowedEmailGroups: cn=e6f-e6f-WG3,cn=klassen,cn=schueler,cn=groups,ou=e6f,dc=wenzel-univention,dc=intranet
mailPrimaryAddress: e6f-WG3@wenzel-univention.intranet

modify with and without share -> OK

list, list-models --attributes, create, modify & delete work as expected with ucsschool.lib.models -> OK
Comment 3 Daniel Tröder univentionstaff 2020-09-17 12:04:12 CEST
* Tests were improved.
* The branch was merged into "4.4".
* Debian packages have been built.

[4.4] f629981f9 Bug #52035: improve fixtures
[4.4] 38e4354fe fixup! Bug #52035: improve fixtures
[4.4] ccb5f4dc8 Bug #52035: Merge branch 'dtroeder/52035_email_in_lib_workgroup' into 4.4
[4.4] 4aa2226ea Bug #52035: changelog
[4.4] d9efeb86b Bug #52035: advisory

Sorry - forgot to apply the fixup during the merge.

ucs-school-lib (12.1.21)
ucs-test-ucsschool (6.0.136)
Comment 4 Tobias Wenzel univentionstaff 2020-09-17 12:17:03 CEST
QA -> All OK -> set to VERIFIED

Changelogs -> OK
No merge conflicts -> OK
Comment 5 Daniel Tröder univentionstaff 2020-10-12 16:18:59 CEST
UCS@school 4.4 v7 has been released.


If this error occurs again, please clone this bug.