Bug 46529 - UMC does not recognize autofilled values for UDM objects, does not save changes
UMC does not recognize autofilled values for UDM objects, does not save changes
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 4.3
Other Linux
: P5 normal (vote)
: UCS 4.3-0-errata
Assigned To: Johannes Keiser
Stefan Gohmann
:
Depends on:
Blocks: 47438
  Show dependency treegraph
 
Reported: 2018-03-07 13:49 CET by Erik Damrose
Modified: 2018-08-02 06:37 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 3: Will affect average number of installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.257
Enterprise Customer affected?: Yes
School Customer affected?:
ISV affected?:
Waiting Support:
Ticket number: 2018030621000769
Bug group (optional):
Max CVSS v3 score:


Attachments
udm_detailpage_with_applied_patch (44.81 KB, image/png)
2018-04-19 19:55 CEST, Johannes Keiser
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Damrose univentionstaff 2018-03-07 13:49:57 CET
See also bug #41053.

When opening an UDM object and some required values were not set at the object, the values were set to their default values, and a popup informed the user about it. When save was clicked, the change were applied.

Testcase: ucs4.2-3e311; Install kopano, open Administrator user. On the kopano tab the role Kopano user is shown. But an ldapsearch and udm user list show that the attribute is undefined.

The UMC udm/get query returns the default value for the attribute: kopano-role
: "user", which is wrong. No change is detected, and one cannot save the object that way. To enable the user, one has to configure a different role, save, reopen, set user role, save.

I would expect that upon opening the user object a popup informs the user that no attribute was defined and the default value was set. When clicking change, the modification should be applied.
Comment 1 Johannes Keiser univentionstaff 2018-04-19 19:53:13 CEST
patch at: jkeiser/46529_umc_does_not_recognize_default_values

The get() method for an UDM object now returns the properties for which a default value was set. The UDM Detailpage uses that information to show the popup again, which informed the user about values that had default values set.

The users/user object has two properties with default values that do not get saved directly.

'unlock' is just a trigger and has no mapping to ldap.
'homeSharePath' which is used for automountInformation is only saved when 'homeShare' is a also set.

At least for 'unlock' the popup would appear every time to inform the user that the default value for 'unlock' has been set.
A flag to prevent the popup for specific properties has been added.

I did not find another objecttype where a property has a default value but no ldap mapping (which would lead to the same problem has 'unlock' for users/user)
Comment 2 Johannes Keiser univentionstaff 2018-04-19 19:55:17 CEST
Created attachment 9509 [details]
udm_detailpage_with_applied_patch
Comment 3 Johannes Keiser univentionstaff 2018-04-26 16:45:30 CEST
0f77c31 Bug #46529: Notify about set default values in UMC
7b28e0c Bug #46529: Restore 4.2-3 behaviour for setting automount objectclass
152f362 Bug #46529: Debian changelog
8a6ab15 Bug #46529: YAML entry
df22826 Bug #46529: Merge branch 'jkeiser/46529_umc_does_not_recognize_default_values' into 4.3-0
61d8d39 Bug #46529: YAML update version

Package: univention-management-console-module-udm
Version: 8.0.5-8A~4.3.0.201804261634

Package: univention-directory-manager-modules
Version: 13.0.21-19A~4.3.0.201804261637


7b28e0c Bug #46529: Restore 4.2-3 behaviour for setting automount objectclass:
after homeSharePath (with the default value of <username>) was no longer ignored when saving i got this error message when trying to save: "Das LDAP-Objekt konnte nicht gespeichert werden: LDAP-Fehler No such attribute: modify/delete: objectClass: no such value"
This was due to the 'automount' objectclass missing. In 4.2-3 it was added when 'homeShare' or 'homeSharePath' was modified. I fixed what i believe was a typo.
Comment 4 Johannes Keiser univentionstaff 2018-05-04 13:04:35 CEST
32d5659 Bug #46529: make shouldPreventPopupForEmptyPropWithDefault call safe
65de35a Bug #46529: Debian changelog
8a38ee2 Bug #46529: YAML update version

Package: univention-management-console-module-udm
Version: 8.0.5-9A~4.3.0.201805041301
Comment 5 Stefan Gohmann univentionstaff 2018-05-08 11:34:05 CEST
Tests: OK: I was able to reproduce the original report. It has been fixed with the latest est errata packages.

YAML: OK
Comment 6 Arvid Requate univentionstaff 2018-05-09 14:04:21 CEST
Incomplete Advisory:

Package "univention-management-console-module-udm.yaml" is WIP with incomplete YAML.

==================================================================
arequate@omar:~/git/ucs/doc/errata/staging$ less univention-management-console-module-udm.yaml 
product: ucs
release: "4.3"
version: [0]
scope: ucs_4.3-0-errata4.3-0
src: 
fix: 8.0.5-9A~4.3.0.201805041301
desc: |
 This update addresses the following issue(s):
 * Properties that have been set to default values are no
   longer ignored when saving from the UDM detail page.
bug: [46529]
==================================================================

I've added the missing src: value
 608752ac9f | Fix inclomplete advisory