Univention Bugzilla – Bug 41910
If users are moved from school A to school B, workinggroup memberships should be adjusted.
Last modified: 2017-03-21 12:35:53 CET
If users are moved from school A to school B, workinggroup memberships should be adjusted/removed.
Workroups of the previous school are already removed from a user after moving it to another school. r74646: the test 90_ucsschool/80_move_users_into_another_ou was adapted to test this
There are 6 code branches here: * user with one school (schoolA) get moved to schoolB OK: Via schoolwizards OK: Via import script * users with 2 schools (schoolA, schoolB) located in SchoolA, removing from schoolA ~OK: Via schoolwizards (works after fixing Bug #43170) OK: Via import script * users with 2 schools (schoolA, schoolB) located in SchoolA, removing from schoolB OK: Via schoolwizards Fail: Via import script I adjusted the test script 207_import-users_school_change to test and reveil this explicitly. When fixing this bug the test script should change the 'print Fail" into a proper assertion which lets the test script fail. ucs-test-ucsschool (3.0.17-32): r75217 | Bug #41910: adjust test case to test workgroup membership when removing user from schools
(In reply to Daniel Tröder from comment #1) > Workroups of the previous school are already removed from a user after > moving it to another school. > > r74646: the test 90_ucsschool/80_move_users_into_another_ou was adapted to > test this Adjusting this test doesn't test the original way the UMC wizard and the Importer uses. That's why it didn't fail. The test is more a unit test for the school-lib. The test case also covers only 1 of the 3 ways.
r76612: * fix ucs-test not checking school(s) attribute(s) * fix setting of school and schools attributes in same update() call
r76682: support automatic removal of secondary schools from User objects, including removal of groups from removed school r76683: modify 207_import-users_school_change to check group membership when adding and removing schools to/from a user Package: ucs-school-lib Version: 9.0.31-1.275.201702151147 Branch: ucs_4.1-0 Scope: ucs-school-4.1r2 Package: ucs-test-ucsschool Version: 3.0.17-59.379.201702151148 Branch: ucs_4.1-0 Scope: ucs-school-4.1r2
This must be release together with ucs-school-umc-wizards 8.0.0-15, as it contains the adaption to the change in User.remove_from_school().
# univention-ldapsearch -LLL uid=eanton1 dn ucsschoolSchool dn: uid=eanton1,cn=schueler,cn=users,ou=100,dc=nstx,dc=local ucsschoolSchool: 100 ucsschoolSchool: gsmitte # univention-ldapsearch -LLL memberUid=eanton1 dn | grep ^dn dn: cn=schueler-gsmitte,cn=groups,ou=gsmitte,dc=nstx,dc=local dn: cn=Domain Users gsmitte,cn=groups,ou=gsmitte,dc=nstx,dc=local dn: cn=gsmitte-1A,cn=klassen,cn=schueler,cn=groups,ou=gsmitte,dc=nstx,dc=local dn: cn=schueler-100,cn=groups,ou=100,dc=nstx,dc=local dn: cn=Domain Users 100,cn=groups,ou=100,dc=nstx,dc=local dn: cn=100-1A,cn=klassen,cn=schueler,cn=groups,ou=100,dc=nstx,dc=local dn: cn=100-Work100,cn=schueler,cn=groups,ou=100,dc=nstx,dc=local dn: cn=gsmitte-MitteWG,cn=schueler,cn=groups,ou=gsmitte,dc=nstx,dc=local Removing user "uid=eanton1" from OU "gsmitte" via UMC module "users (schools)" with fixed #43170 but unfixed #41910: dn: cn=schueler-gsmitte,cn=groups,ou=gsmitte,dc=nstx,dc=local -uniqueMember: uid=eanton1,cn=schueler,cn=users,ou=100,dc=nstx,dc=local -memberUid: eanton1 dn: cn=gsmitte-1A,cn=klassen,cn=schueler,cn=groups,ou=gsmitte,dc=nstx,dc=local -uniqueMember: uid=eanton1,cn=schueler,cn=users,ou=100,dc=nstx,dc=local -memberUid: eanton1 dn: cn=gsmitte-MitteWG,cn=schueler,cn=groups,ou=gsmitte,dc=nstx,dc=local -uniqueMember: uid=eanton1,cn=schueler,cn=users,ou=100,dc=nstx,dc=local -memberUid: eanton1 dn: cn=Domain Users gsmitte,cn=groups,ou=gsmitte,dc=nstx,dc=local -uniqueMember: uid=eanton1,cn=schueler,cn=users,ou=100,dc=nstx,dc=local -memberUid: eanton1 dn: uid=eanton1,cn=schueler,cn=users,ou=100,dc=nstx,dc=local -ucsschoolSchool: gsmitte → looks good so far, but 207_import-users_school_change fails If #41910 is fixed, the removal via UMC shows the same LDAP changes, and the test script 207_import-users_school_change does not fail any longer. OK: code change OK: functional test OK: YAML
UCS@school 4.1 R2 v10 has been released. http://docs.software-univention.de/changelog-ucsschool-4.1R2v10-de.html If this error occurs again, please clone this bug.