Bug 46832 - [4.2] model resource to make available import permissions / roles readable
[4.2] model resource to make available import permissions / roles readable
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: HTTP-API (Kelvin)
UCS@school 4.2
Other Linux
: P5 normal (vote)
: UCS@school 4.2 v10
Assigned To: Daniel Tröder
Ole Schwiegert
https://forge.univention.org/bugzilla...
:
Depends on: 45749 47118
Blocks: 46829
  Show dependency treegraph
 
Reported: 2018-04-17 11:00 CEST by Daniel Tröder
Modified: 2018-07-04 18:07 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.034
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:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Tröder univentionstaff 2018-04-17 11:00:31 CEST
+++ This bug was initially created as a clone of Bug #45749 +++

In Bug #45717 the available roles for an import are retrieved in the Python client library. That was enough for a client that should run on the dc master. But the information should really be available through the HTTP API.

Make the roles available for an import readable through the HTTP API.
Comment 1 Daniel Tröder univentionstaff 2018-06-04 11:24:58 CEST
Backported source code from 4.3.

[4.2] 01c61919 Bug #46832: add Role model
[4.2] 83f55f26 Bug #46832: add Role serializer and view
[4.2] 4dab4606 Bug #46832: don't open LDAP connection at import time
[4.2] 23aac1e1 Bug #46832: support school='*' in query
[4.2] dd06665f Bug #46832: minor improvements
[4.2] e67f53c0 Bug #46832: Python client lib uses new Role resource
[4.2] a37a1096 Bug #46832: add support for Role resource
[4.2] 6e166853 Bug #46832: split non-cli-import code into separate (base) class
[4.2] 06fc665d Bug #46832: add test for HTTP-API Python client
[4.2] 3bfdae1d Bug #46832: changelog
[4.2] b581d4fa Bug #46832: advisories


ucs-school-import (15.0.3-42)
ucs-school-umc-import (0.0.1-18)
ucs-test-ucsschool (4.0.4-94)
Comment 2 Daniel Tröder univentionstaff 2018-06-11 14:10:59 CEST
[4.2] 88f4f341 Bug #46832: use HTTP-API test class, also check schools
Comment 3 Daniel Tröder univentionstaff 2018-06-11 18:27:03 CEST
[4.2] dc736568 Bug #46832: create Django School object after ucsschool.lib school creation
[4.2] dc53e612 Bug #46832: changelog
[4.2] ce7eeb59 Bug #46832: advisory
Comment 4 Ole Schwiegert univentionstaff 2018-06-21 09:03:29 CEST
I stumbled over this, while doing QA for #46829. If I am not mistaken you entered the dependencies for the versions of the 4.3 branch in usc-school-umc-import/debian/control

https://git.knut.univention.de/univention/ucsschool/commit/a37a10960f76b1afbf9440cc038d77c7d5a3d277

The newest available version of ucs-school-import in 4.2 is 15.0.3-55A~4.2.0.201806201026 at the moment of writing this comment.
Comment 5 Daniel Tröder univentionstaff 2018-06-21 09:22:51 CEST
Oops - version confusion!

[4.2] 74742842d Bug #46832: fix package dependency
[4.2] 9578f9e94 Bug #46832: advisory update

ucs-school-umc-import (0.0.1-19)
Comment 6 Sönke Schwardt-Krummrich univentionstaff 2018-06-22 15:13:16 CEST
OK: functional change
OK: manual test against https://$FQDN/api/v1/roles/
OK: manual test against https://$FQDN/api/v1/schools/$OU/roles/
OK: code change
OK: changelog entry
OK: advisory
OK: package built and installable
Comment 7 Daniel Tröder univentionstaff 2018-06-27 11:10:49 CEST
The hook ou_create_post.d/70http-api_school_create was in the wrong package, which lead to "ImportError: No module named django" when run.

[4.2] a3efb58b5 Bug #46832: fix hook belonging to wrong package

Minor fixes:

[4.2] 18439a242 Bug #46832: remove redundant dependency
[4.2] 20d754e40 Bug #46832: fix docstring

[4.2] e3b3885cb Bug #46832: changelog
[4.2] 705915ce6 Bug #46832: advisory update

ucs-school-import (15.0.3-58)
Comment 8 Ole Schwiegert univentionstaff 2018-06-29 15:52:02 CEST
OK: manual test against https://$FQDN/api/v1/roles/
OK: manual test against https://$FQDN/api/v1/schools/$OU/roles/
OK: changelog entry
OK: advisory
OK: package built and installable
OK: script is in the correct package
Comment 9 Sönke Schwardt-Krummrich univentionstaff 2018-07-04 18:07:56 CEST
UCS@school 4.2 v10 has been released.

https://docs.software-univention.de/changelog-ucsschool-4.2v10-de.html

If this error occurs again, please clone this bug.