Bug 38832

Summary: Default user template
Product: UCS Reporter: Stefan Gohmann <gohmann>
Component: UMC - UsersAssignee: Alexander Kramer <kramer>
Status: CLOSED FIXED QA Contact: Alexander Kläser <klaeser>
Severity: normal    
Priority: P5 CC: klaeser, walkenhorst
Version: UCS 4.0   
Target Milestone: UCS 4.0-2-errata   
Hardware: Other   
OS: Linux   
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: bug_38832.patch

Description Stefan Gohmann univentionstaff 2015-07-03 21:28:19 CEST
It should be possible to define a default user template, for example
  ucr set umc/default/usertemplate="groupware account"
Comment 1 Stefan Gohmann univentionstaff 2015-07-04 14:18:58 CEST
As an alternative the first found template should be used, that would solve my use case.
Comment 2 Stefan Gohmann univentionstaff 2015-07-04 14:20:00 CEST
Created attachment 7003 [details]
bug_38832.patch
Comment 3 Alexander Kramer univentionstaff 2015-07-08 09:56:03 CEST
Patch applied. Now the first template (ABC order) is used.

r61861
univention-management-console-module-udm (5.1.25-73)
Comment 4 Alexander Kramer univentionstaff 2015-07-08 13:20:00 CEST
(In reply to Stefan Gohmann from comment #0)
> It should be possible to define a default user template, for example
>   ucr set umc/default/usertemplate="groupware account"

This feature already exists see Bug #13073
I kept the ucr variable ...
directory/manager/web/modules/users/user/add/default

... but we added some convenient behavior:
- if no variable is set, the first template is used
- ... also if the variable does not match with any template id or label
- the variable can contain a dn or app name/label (e.g. owncloud), we check both cases
- the label is case insensitive
- the label which matches with the dn/label is displayed as default
- the list entry 'None' will be always displayed at the top of the list
- ... for this we made a shallow copy of the templates
- ... this will also avoid unwanted changes of the list 

r61869
univention-management-console-module-udm (5.1.25-74) 

r61870
- adapted the german translation for None from Kein to Keine (Vorlage)

Successful build
Package: univention-management-console-module-udm
Version: 5.1.25-75.585.201507081305
Branch: ucs_4.0-0
Scope: errata4.0-2

r61874:
yaml file
Comment 5 Alexander Kläser univentionstaff 2015-07-09 10:24:12 CEST
As discussed, I adjusted the YAML file slightly.
Comment 6 Alexander Kramer univentionstaff 2015-07-09 11:06:47 CEST
r61973
Description of the ucr variable adapted

Successful build
Package: univention-directory-manager-modules
Version: 10.0.31-3.1326.201507091100
Branch: ucs_4.0-0
Scope: errata4.0-2


r61974
yaml file
Comment 7 Alexander Kramer univentionstaff 2015-07-09 14:12:51 CEST
r61977
Improved template condition

Package: univention-management-console-module-udm
Version: 5.1.25-76.587.201507091406
Branch: ucs_4.0-0
Scope: errata4.0-2

r61987
yaml file
Comment 8 Janek Walkenhorst univentionstaff 2015-07-09 18:08:55 CEST
<http://errata.univention.de/ucs/4.0/235.html>
Comment 9 Florian Best univentionstaff 2015-07-10 11:25:40 CEST
*** Bug 26424 has been marked as a duplicate of this bug. ***
Comment 10 Alexander Kläser univentionstaff 2015-07-29 18:40:23 CEST
Changes look good and work as expected. A adjusted the YAML entry a tiny bit.

2015-05-12-univention-management-console-module-udm.yaml:
r62497 | Bug #38832: minor YAML entry adjustments

→ VERIFIED
Comment 11 Janek Walkenhorst univentionstaff 2015-08-06 17:55:38 CEST
<http://errata.univention.de/ucs/4.0/265.html>