Bug 50262 - [UDM HTTP API] PATCH position does not move user
[UDM HTTP API] PATCH position does not move user
Status: NEW
Product: UCS
Classification: Unclassified
Component: UDM - REST API
UCS 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: UMC maintainers
UMC maintainers
https://forge.univention.org/bugzilla...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-09-25 16:49 CEST by Daniel Tröder
Modified: 2019-09-25 16:49 CEST (History)
2 users (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):
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 2019-09-25 16:49:15 CEST
When telling the UDM REST API to change the "position" of an object, it only works in PUT, but not in PATCH:

-------------------------------------------------------

$ udm users/user create --set username="newuser01" --set firstname="Random" --set lastname="User" --set password="Univention.99"
WARNING: The object is not going to be created underneath of its default containers.
Object created: uid=newuser01,dc=uni,dc=dtr

-------------------------------------------------------

curl -i -X PATCH \
   -H "Accept:application/json" \
   -H "Content-Type:application/json" \
   -d \
'{
  "position": "cn=users,dc=uni,dc=dtr"
}' \
 'https://m66.uni.dtr/univention/udm/users/user/uid=newuser01,dc=uni,dc=dtr'

-------------------------------------------------------

$ univention-ldapsearch -LLL  uid=newuser01 dn
dn: uid=newuser01,dc=uni,dc=dtr