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
I scrambled the Idea: It should be a PATCH with "schools: [A, C]"
Another hint: As a workaround both steps can be done separately: First a PATCH to remove B, afterwards a new request adding C.
Looks like this was fixed via Bug 54481. *** This bug has been marked as a duplicate of bug 54481 ***