mgr/dashboard: Email addr is set to false when RGW user is modified
When a RGW user is modified via the dashboard UI, then an empty email field is submitted with the value 'false'. Seems to be a problem while collecting the modified fields before they are submitted to the backend.
Modifying a user whit a modified max buckets field finally looks like http://localhost:4200/api/rgw/user/test4?display_name=test4&email=false&max_buckets=1001&suspended=0
#1 Updated by Volker Theile 4 months ago
- Assignee set to Stephan Müller
- Regression changed from No to Yes
The incorrect value is set by the method https://github.com/ceph/ceph/blob/master/src/pybind/mgr/dashboard/frontend/src/app/shared/forms/cd-form-group.ts#L59. The code has been introduced by PR https://github.com/ceph/ceph/pull/22644.
The fields to be sbumitted are collected here: https://github.com/ceph/ceph/blob/master/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-form/rgw-user-form.component.ts#L607
#2 Updated by Volker Theile 4 months ago
The behaviour of the class CdFormGroup introduced by PR 22644 is not exactly the same as the origin FormGroup. Please fix the issue in the CdFormGroup class or the RGW user form. I suggest to fix it in CdFormGroup because there is surely other code that assumes the behaviour of the origin FormGroup class (e.g. RGW bucket management). I don't understand the sense of an boolean result if the input field is of type string. The current implementation is erroneous for input fields that accept empty values.