Bug 50675 - [Kelvin API] allow search for users using all attributes and mapped properties
Summary: [Kelvin API] allow search for users using all attributes and mapped properties
Status: CLOSED FIXED
Alias: None
Product: UCS@school
Classification: Unclassified
Component: HTTP-API (Kelvin)
Version: UCS@school 4.4
Hardware: Other Linux
: P5 normal
Target Milestone: ---
Assignee: Daniel Tröder
QA Contact: Ole Schwiegert
URL:
Keywords:
Depends on:
Blocks: 50637
  Show dependency treegraph
 
Reported: 2020-01-03 08:41 CET by Daniel Tröder
Modified: 2021-02-23 09:29 CET (History)
1 user (show)

See Also:
What kind of report is it?: Development Internal
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):
Customer ID:
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 2020-01-03 08:41:35 CET
Users of the Kelvin API should be able to search users using all UCS@school attributes (name, firstname, birthday etc) and mapped UDM properties (employeeType, e-mail, uidNumber etc).

"mapped UDM properties" are those in the UCS@school import configuration:

------------------------------------------------------------------------
$ cat /var/lib/ucs-school-import/configs/user_import.json
{
"configuration_checks": ["defaults", "mapped_udm_properties"],
"mapped_udm_properties": ["title", "description", "employeeType", "uidNumber", "gidNumber"]
}
------------------------------------------------------------------------

The following query returns all users whos

* name starts with "demo"
* are not disabled
* uidNumber is 2010

$ curl -q -k -X GET 'https://FQDN/kelvin/api/v1/users/?name=demo*&disabled=false&uidNumber=2010' -H "accept: application/json" -H "Authorization: Bearer ..."
Comment 1 Daniel Tröder univentionstaff 2020-01-03 08:53:59 CET
[feature/kelvin] f03f2684e Bug #50675: search users using all attributes and mapped properties
[feature/kelvin] f2feac22b Bug #50675: always use ImportUser
[feature/kelvin] 49e818bc5 Bug #50675: handle udm_properties attribute
[feature/kelvin] 8d607a1b0 Bug #50675: cleanup
[feature/kelvin] be90cc92e Bug #50675: lower logging level
[feature/kelvin] 409734753 Bug #50675: in Python 3 filter() returns a <filter object> (an iterator), which is not evaluated by if or repr
[feature/kelvin] f9941842f Bug #50675: test search
Comment 2 Daniel Tröder univentionstaff 2020-01-03 15:43:40 CET
[feature/kelvin] b8fe65348 Bug #50675: test create, search and modify multi-value field
Comment 3 Daniel Tröder univentionstaff 2020-01-03 18:26:58 CET
[feature/kelvin a7a0205b6] Bug #50675: fix school_class representation
Comment 4 Ole Schwiegert univentionstaff 2020-01-06 13:15:41 CET
Looks all good for me. Ran tests, compared with BB manually. Searched for attributes, mapped_udm.
Comment 5 Daniel Tröder univentionstaff 2021-02-23 09:29:42 CET
A Kelvin API app with the changes in this bug has been published.