Bug 55355 - Allow arbitrary context types in ucsschool lib
Allow arbitrary context types in ucsschool lib
Product: UCS@school
Classification: Unclassified
Component: Ucsschool-lib
UCS@school 5.0
Other Linux
: P5 normal (vote)
: UCS@school 5.0 v3-errata
Assigned To: Tobias Wenzel
Felix Botner
Depends on:
  Show dependency treegraph
Reported: 2022-10-27 16:50 CEST by Tobias Wenzel
Modified: 2023-05-26 10:57 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Feature Request
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Wenzel univentionstaff 2022-10-27 16:50:31 CEST
## Story

As an administrator of a UCS@school domain
I can attach arbitrary roles with custom context types to my school objects,
so that I can implement custom logic.

## Context/description

Currently the school lib throws errors if a school object has roles that do not have the context type `school` or `exam`. The lib also checks some additional requirements, like the use of only defined role names. In reality we want the following situation though:
- If a role with the context type school or exam is used, we want to enforce all current rules and throw errors as before
- Any other role string, which has an unknown context type, is allowed and will simply be ignored.
- All role strings still have to follow the triple segment syntax (role:context_type:context)

Additional points:

- This has to be changed both in host ucsschool lib and kelvin!
- This affects the get_role_info and create_role_string function in the ucsschool lib

## Acceptance criteria & steps for reproduction

- Arbitrary context types are allowed
- The Kelvin changes are available at least in the test appcenter
- The changes to ucsschool **have been released** as an errata
Comment 1 Alexander Steffen univentionstaff 2022-11-03 11:25:31 CET
Fixed with:

Package: ucs-school-lib
Version: 13.0.25A~
Comment 2 Tobias Wenzel univentionstaff 2022-11-04 08:16:20 CET
Verified, all ok. (Discussion on
Comment 3 Tobias Wenzel univentionstaff 2022-11-11 14:10:04 CET
some things were missing, reopen
Comment 4 Tobias Wenzel univentionstaff 2022-11-11 14:10:18 CET
some things were missing, reopen
Comment 5 Tobias Wenzel univentionstaff 2022-11-14 11:29:21 CET
Package: ucs-school-lib
Version: 13.0.29A~
Branch: ucs_5.0-0
Scope: ucs-school-5.0

Package: ucs-test-ucsschool
Version: 7.3.81A~
Branch: ucs_5.0-0
Scope: ucs-school-5.0
Comment 6 Felix Botner univentionstaff 2022-11-14 11:35:18 CET
OK - ucsschool-lib (13.0.29)
OK - tests
OK - yaml
Comment 7 Tobias Wenzel univentionstaff 2022-11-17 16:27:28 CET
Errata updates for UCS@school 5.0 v3 have been released.


If this error occurs again, please clone this bug.