Bug 50024 - [UDM HTTP API] add form ignores passed options, thus misses properties
[UDM HTTP API] add form ignores passed options, thus misses properties
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UDM - REST API
UCS 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: Florian Best
UMC maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-08-19 15:22 CEST by Daniel Tröder
Modified: 2019-10-02 16:06 CEST (History)
1 user (show)

See Also:
What kind of report is it?: ---
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-08-19 15:22:44 CEST
The object template retrieved through the add form does not contain properties that require options to be set.
For example the "school" property is missing, if the option "uscschoolTeacher" (etc) is not set. But when the option is passed to the add form, in the reply the option is still unset and thus the property is missing.

Add support for for the "options" argument and deliver object templates containing all properties that are enabled for the options.
Comment 1 Florian Best univentionstaff 2019-08-26 22:08:18 CEST
Now, all properties are send, even if the option is not enabled :-)
I don't think we need parameters for the options?!

univention-management-console-module-udm (9.0.12-27)
bfb4130680ff | Bug #27816: cleanup representations
Comment 2 Daniel Tröder univentionstaff 2019-08-27 09:36:49 CEST
Sending all properties regardless of options is good IMHO.
I think either options should not be accepted in the request (→ 400 BAD REQUEST) or if they are, then they should be sent back exactly like they were received. So that if the client uses the template he doesn't accidentally en/disable additional options.
Comment 3 Florian Best univentionstaff 2019-10-02 16:06:33 CEST
UCS 4.4-2 has been released:
 https://docs.software-univention.de/release-notes-4.4-2-en.html
 https://docs.software-univention.de/release-notes-4.4-2-de.html

If this error occurs again, please use "Clone This Bug".