Bug 54513 - 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: RESOLVED DUPLICATE of bug 54481
Alias: None
Product: UCS@school
Classification: Unclassified
Component: HTTP-API (Kelvin)
Version: UCS@school 5.0
Hardware: Other Linux
: P5 normal
Target Milestone: ---
Assignee: UCS@school maintainers
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-07 12:26 CET by Jan-Luca Kiok
Modified: 2023-06-06 15:32 CEST (History)
2 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 2022-03-07 12:26:30 CET
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 1 Jan-Luca Kiok univentionstaff 2022-03-07 14:24:06 CET
I scrambled the Idea: It should be a PATCH with "schools: [A, C]"
Comment 2 Jan-Luca Kiok univentionstaff 2022-03-09 15:23:49 CET
Another hint: As a workaround both steps can be done separately: First a PATCH to remove B, afterwards a new request adding C.
Comment 4 Jan-Luca Kiok univentionstaff 2022-11-02 10:44:20 CET
Looks like this was fixed via Bug 54481.

*** This bug has been marked as a duplicate of bug 54481 ***