+++ This bug was initially created as a clone of Bug #54513 +++ Use Case: A user is created at school A (primary) and school B, the assignment changes from school B to school C. Idea: A PATCH with "schools: [A, B]" Expected: The user is removed from everything regarding school B (groups & roles) and receives the right permissions at school C. Actual: The user is removed from school B, but is not placed in school Cs default groups. Log: 2022-02-17 14:17:50 INFO establishing new connection with retry_max=11 2022-02-17 14:17:50 INFO bind binddn=cn=admin,dc=lernen,dc=example 2022-02-17 14:17:50 INFO Modifying SchoolGroup(name='lehrer-B', school='B', dn='cn=lehrer-B,cn=groups,ou=B,dc=lernen,dc=example') 2022-02-17 14:17:50 INFO SchoolGroup(name='lehrer-B', school='B', dn='cn=lehrer-B,cn=groups,ou=B,dc=lernen,dc=example') successfully modified 2022-02-17 14:17:50 INFO Removing 'uid=schulWechsel1,cn=lehrer,cn=users,ou=A,dc=lernen,dc=example' from group 'cn=Domain Users B,cn=groups,ou=B,dc=lernen,dc=example' of school 'B'. 2022-02-17 14:17:50 INFO Modifying SchoolGroup(name='Domain Users B', school='B', dn='cn=Domain Users B,cn=groups,ou=B,dc=lernen,dc=example') 2022-02-17 14:17:50 INFO SchoolGroup(name='Domain Users B', school='B', dn='cn=Domain Users B,cn=groups,ou=B,dc=lernen,dc=example') successfully modified 2022-02-17 14:17:50 INFO establishing new connection with retry_max=11 2022-02-17 14:17:50 INFO bind binddn=cn=admin,dc=lernen,dc=example 2022-02-17 14:17:50 WARNING UDM object 'cn=lehrer-A,cn=groups,ou=A,dc=lernen,dc=example' does not correspond to a Python class in the UCS school lib. 2022-02-17 14:17:50 WARNING UDM object 'cn=lehrer-B,cn=groups,ou=B,dc=lernen,dc=example' does not correspond to a Python class in the UCS school lib. 2022-02-17 14:17:50 WARNING UDM object 'cn=Domain Users B,cn=groups,ou=B,dc=lernen,dc=example' does not correspond to a Python class in the UCS school lib. 2022-02-17 14:17:54 ERROR edcda680-3540-4af8-96f6-6bd486da7ea5 UCS@school Object uid=schulWechsel1,cn=lehrer,cn=users,ou=A,dc=lernen,dc=example with options {'pki': False, 'ucsschoolStudent': False, 'ucsschoolTeacher': True, 'ucsschoolStaff': False, 'ucsschoolAdministrator ': False, 'ucsschoolExam': False} has validation errors: - is not part of schools: ['C']. 2022-02-17 14:17:54 ERROR b679e825-2e0e-4614-b210-bc8e3b0878e0 UCS@school Object uid=schulWechsel1,cn=lehrer,cn=users,ou=A,dc=lernen,dc=example with options {'pki': False, 'ucsschoolStudent': False, 'ucsschoolTeacher': True, 'ucsschoolStaff': False, 'ucsschoolAdministrator ': False, 'ucsschoolExam': False} has validation errors: - is not part of schools: ['C']. 2022-02-17 14:17:54 INFO ImportTeacher(name='schulWechsel1', school='A', dn='uid=schulWechsel1,cn=lehrer,cn=users,ou=A,dc=lernen,dc=example') successfully modified 2022-02-17 14:17:54 INFO 172.17.42.1:46824 - "PATCH /ucsschool/kelvin/v1/users/schulWechsel1 HTTP/1.1" 200
QA - [x] pytests on vm: - [x] kelvin manual test) - [x] bsb specific (manual) test https://git.knut.univention.de/univention/components/ucsschool-kelvin-rest-api/-/issues/93#note_197162 - [x] changelog ok - [x] pipelines green - [x] jenkins branch job ok [api-client](https://jenkins2022.knut.univention.de/view/UCS@school/job/UCSschool-5.0/view/Daily%20Tests/job/Kelvin-client-daily/304/) -> `test_school.test_create_all_attrs` fails for different reasons - [x] jenkins branch job [api](https://jenkins2022.knut.univention.de/job/UCSschool-5.0/view/Daily%20Tests/job/kelvin%20API%20(branch%20main)/337/) - [x] jenkins main jobs - [x] issue & bug for ucsschool port is created; feel free to adapt https://git.knut.univention.de/univention/ucsschool/-/issues/1084 - [x] performance implications https://git.knut.univention.de/univention/components/ucsschool-kelvin-rest-api/-/issues/93#note_193931
Kelvin Rest API 1.8.10 has been released. https://appcenter.software-univention.de/univention-repository/4.4/maintained/component/ucsschool-kelvin-rest-api_20230622113644/README_UPDATE_EN If this error occurs again, please clone this bug.