Bug 54680 - udm settings/usertemplate cannot set nextcloudEnabled=0
udm settings/usertemplate cannot set nextcloudEnabled=0
Status: NEW
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 5.0
Other Windows NT
: P5 normal (vote)
: ---
Assigned To: UMC maintainers
UMC maintainers
https://git.knut.univention.de/univen...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2022-04-21 14:19 CEST by Thorsten
Modified: 2022-04-22 12:07 CEST (History)
2 users (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):
Max CVSS v3 score:


Attachments
hack to make it working (3.49 KB, patch)
2022-04-21 14:58 CEST, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thorsten univentionstaff 2022-04-21 14:19:10 CEST
When creating an usertemplate containing the following setting for an extended attribute nextcloudEnabled=0 the setting is not applied when the template is chosen.
This was already analysed by fbest and is a generic issue for all Univention apps that are using app-tabs fake-extended-options.
Comment 1 Florian Best univentionstaff 2022-04-21 14:58:56 CEST
Created attachment 10940 [details]
hack to make it working

Attached is a patch which is not suitable for the product but which fixes the problems.

We have multiple problems here:
1. the javascript evaluation of template "_options" did not work due to a missing lang.copy() call. Something changes the original "template" object definition asyncronous between two function calls and removes everything starting the "_" or "$".

2. nextcloud uses fake-app extended-options with a "boolean" Syntax. UDM does not store boolean values with 0 in LDAP for extended attributes. We probably cannot change this as other apps depends on this behavior. I would have to dig to find out which apps.

3. the fake extended options don't behave like regular extended options. Regular all extended attributes/options which apply for users/user automatically also apply for settings/usertemplate. This was not the case for fake-extended-options.

4. the fake extended options are only a layer in UMC, not in UDM. Therefore the UDM module settings/usertemplate doesn't detect which extended options are currently applied to add them into the "_options" property.

We should really start to migrate all apps which are using fake extended options into apps which are using real extended options! (!!!!!!!!! I say this since years!!!! since we introduced this bull****!!!!).