Univention Bugzilla – Full Text Bug Listing |
Summary: | Extended Attribute Defaults are not taken into account for already created users | ||
---|---|---|---|
Product: | UCS | Reporter: | Ingo Steuwer <steuwer> |
Component: | UDM - Extended Attributes | Assignee: | Florian Best <best> |
Status: | CLOSED FIXED | QA Contact: | Johannes Keiser <keiser> |
Severity: | normal | ||
Priority: | P5 | CC: | best, birkefeld, damrose, gohmann, klaeser, roland.buser |
Version: | UCS 4.1 | ||
Target Milestone: | UCS 4.2-0-errata | ||
Hardware: | Other | ||
OS: | Linux | ||
See Also: |
https://forge.univention.org/bugzilla/show_bug.cgi?id=42864 https://forge.univention.org/bugzilla/show_bug.cgi?id=45066 https://forge.univention.org/bugzilla/show_bug.cgi?id=45581 https://forge.univention.org/bugzilla/show_bug.cgi?id=48092 |
||
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?: | |
School Customer affected?: | ISV affected?: | Yes | |
Waiting Support: | Flags outvoted (downgraded) after PO Review: | ||
Ticket number: | 2015112421000635 | Bug group (optional): | Usability |
Max CVSS v3 score: | |||
Bug Depends on: | 43395 | ||
Bug Blocks: | |||
Attachments: |
Screenshot
untested patch which always sets default values patch patch |
Description
Ingo Steuwer
2016-04-14 14:32:32 CEST
Created attachment 7595 [details]
Screenshot
A screenshot is worth a thousand words :) ...
reported again by 2015112421000635 Created attachment 7742 [details]
untested patch which always sets default values
Created attachment 7743 [details]
patch
(In reply to Florian Best from comment #3) > Created attachment 7742 [details] > untested patch which always sets default values This patch sets the default values *always* before create() or open() - if the value is unset. (In reply to Florian Best from comment #4) > Created attachment 7743 [details] > patch This patch adds a new flag to the property which causes that in open() the default value is set - so that it gets displayed correctly in UMC. It required to extend the extended attribute schema. Comment on attachment 7742 [details]
untested patch which always sets default values
self.set_defaults decides whether default values should be set. the logic in __getitem__ makes sure that it is set in the very end. The patch sets it hard, which should not be done.
Comment on attachment 7743 [details]
patch
This patch should consider that self.save() is called after setting the attributes - this has side effects when not using via UMC.
Created attachment 7885 [details]
patch
Patch against the UDM-UMC module to fill in all default values before sending the data to the frontend.
A slightly adapted patch has been applied. This probably makes the OX hooks obsolete. univention-management-console-module-udm (7.0.10-1): r79318 | Bug #41053: set default values of objects when receiving form values univention-management-console-module-udm.yaml: r79318 | Bug #41053: set default values of objects when receiving form values Reopen: Please recheck. If i create a new user from a usertemplate, a default SAML serviceprovider with empty value is set, which fails upon saving the user object. (In reply to Erik Damrose from comment #10) > Reopen: Please recheck. If i create a new user from a usertemplate, a > default SAML serviceprovider with empty value is set, which fails upon > saving the user object. Yes, for extended attribute (SAML serviceprovider is one) the code which reads the default values from LDAP into the UDM property instance sets always a default of [""] (which is wrong). Instead [None] should be used if no default is set. univention-directory-manager-modules (12.0.17-7): r79371 | Bug #41053: fix default value of extended attributes which don't specify a default univention-directory-manager-modules.yaml: r79372 | YAML Bug #41053 (In reply to Florian Best from comment #11) > Yes, for extended attribute (SAML serviceprovider is one) the code which > reads the default values from LDAP into the UDM property instance sets > always a default of [""] (which is wrong). Instead [None] should be used if > no default is set. This works for my test case OK: Default values of extended attributes are set for existing users (Tested with OX, Kopano, OwnCloud, new univentionFreeAttribute) OK: YAML |