Bug 56121 - Assignment to a new school does not complete if another school is removed
Summary: Assignment to a new school does not complete if another school is removed
Status: CLOSED FIXED
Alias: None
Product: UCS@school
Classification: Unclassified
Component: HTTP-API (Kelvin)
Version: UCS@school 5.0
Hardware: Other Linux
: P5 normal
Target Milestone: ---
Assignee: Carlos García-Mauriño
QA Contact: Tobias Wenzel
URL: https://git.knut.univention.de/univen...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-06 15:31 CEST by Jan-Luca Kiok
Modified: 2023-08-24 11:52 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.171
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Customer ID: 10568
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan-Luca Kiok univentionstaff 2023-06-06 15:31:56 CEST
+++ 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
Comment 2 Tobias Wenzel univentionstaff 2023-08-23 15:35:05 CEST
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
Comment 3 Johannes Königer univentionstaff 2023-08-24 11:52:41 CEST
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.