Bug 54316 - ucr does not work for directory/manager/web/modules/users/user/wizard/property/invite/default
ucr does not work for directory/manager/web/modules/users/user/wizard/propert...
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - Users
UCS 4.4
amd64 All
: P5 normal (vote)
: UCS 5.0-1-errata
Assigned To: Christian Castens
Florian Best
https://git.knut.univention.de/univen...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2022-01-10 16:44 CET by Thorsten
Modified: 2022-03-09 13:43 CET (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): bitesize
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thorsten univentionstaff 2022-01-10 16:44:18 CET
The setting 

ucr set directory/manager/web/modules/users/user/wizard/property/invite/default=True    

should trigger the user wizard to flag the "invite user by email" option as default and render therefore the input field for the user's email address.

Florian already provided a example patch:

diff --git management/univention-management-console-module-udm/umc/js/udm/wizards/users/user.js management/univention-management-console-module-udm/umc/js/udm/wizards/users/user.js
index 2d1b921c5d..cb4f2cf069 100644
--- management/univention-management-console-module-udm/umc/js/udm/wizards/users/user.js
+++ management/univention-management-console-module-udm/umc/js/udm/wizards/users/user.js
@@ -60,7 +60,11 @@ define([
                        this.inherited(arguments);
                        array.forEach(this.pages, function(page) {
                                array.forEach(this.getPage(page.name)._form.widgets, function(widget) {
-                                       var ucrkey = {'_invite': 'invite'}[widget.id] || widget.id;
+                                       var ucrkey = widget.id;
+                                       if (widget.name == '_invite') {
+                                               widget.id = '_invite';
+                                               ucrkey = 'invite';
+                                       }
                                        var wid = this.getWidget(page.name, widget.id);
                                        var visibility = this.ucr['directory/manager/web/modules/users/user/wizard/property/' + ucrkey + '/visible'];
                                        var defaultValue = this.ucr['directory/manager/web/modules/users/user/wizard/property/' + ucrkey + '/default'];
Comment 1 Christian Castens univentionstaff 2022-03-07 18:29:52 CET
Successful build
Package: univention-management-console-module-udm
Version: 10.0.1-21A~5.0.0.202203071814
Branch: ucs_5.0-0
Scope: errata5.0-1

UCR variable directory/manager/web/modules/users/user/wizard/property/invite/default
did not work and therefore had to be fixed. This UCR variable can be used to activate the `invite via e-mail` option for the UMC user wizard by default.

Commits to 5.0-1
96938bcaf20ea2c5d8e8ce26b50aa50ebaa92668 (fix, changelog, yaml)
d70e3dc055fa7f97b1350c84b5746a9284599af4 (yaml)
Comment 2 Florian Best univentionstaff 2022-03-09 12:48:10 CET
OK: invite check box
OK: YAML

univention-management-console-module-udm.yaml
d70e3dc055fa | Bug #54316: yaml
96938bcaf20e | Bug #54316: fix functionality of UMC user wizard UCR variable

univention-management-console-module-udm (10.0.1-21)
96938bcaf20e | Bug #54316: fix functionality of UMC user wizard UCR variable