Univention Bugzilla – Bug 48839
App Tabs: Be fully backwards compatible while enabling tab for Apps installed in 4.3
Last modified: 2019-03-12 13:40:56 CET
Maybe we can implement the App Tabs by not changing 4.3 at all. Idea: Modify the UMC layout. (I.e., UMC only, not changing UDM) +++ This bug was initially created as a clone of Bug #48621 +++ The users/user view should have a tab which shows a checkbox for every available app and to activate users for this app. See attachment for a mock up.
Done like this: ini files may now specify the attributes that act as options. As such, they do not need to be specified in the .attributes file, they may be created by the join script. univention-app dev-set openproject UMCOptionsAttributes=openprojectActivated This option is only known to UCS 4.4, but if we change every ini file, Apps installed by any 4.3 systems will still generate the App tab as the tab is rendered on the 4.4 master system. Installed apps are recognized by the appcenter/apps UDM module. We hack into get_layout and get_options so that an attribute like openprojectActivated is the name of an option. Associated attributes (in this case: openproject-isadmin) are put into its own App specific tab. This is done by searching all extended attributes that are in the same container and are connected to the same UDM module. We also change modify and add so that an activated option is mapped to a "TRUE" value for the actual attribute. => No settings/extended_option needed. No subtle change in the LDAP behaviour. No new .attributes file needed. No errata for 4.3 needed. No 4.3/4.4 mixed installation issues. The new layout is very simple and currently does not support fancy layout-in-layout. Tested with OpenProject, ownCloud, Nextcloud. (Needs explicit settings in the ini file, though!) Not tested with OX. Failed for current SuiteCRM. But this is not a huge problem: Just do not specify anything in the ini file and it works as before, just without the neat Apps tab. Git: 848cd19e1adec7192b2aa4dcc2c647dbcccb2bec
*** Bug 48791 has been marked as a duplicate of this bug. ***
Traceback (most recent call last): File "%PY2.7%/univention/management/console/base.py", line 253, in execute function.__func__(self, request, *args, **kwargs) File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 117, in _decoarated ret = [func(self, request) for request.options in options] File "%PY2.7%/univention/management/console/modules/decorators.py", line 192, in _response return function(self, request) File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 836, in layout return module.get_layout(object_dn) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 884, in get_layout layout = AppAttributes.new_layout(self.name, layout) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 266, in new_layout options = cls.options_for_module(module) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 199, in options_for_module for option_name, option_def in cls.data_for_module(module).iteritems(): File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 194, in data_for_module return cls._get_cache().get(module, {}) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 160, in _get_cache if obj['sytax'] == 'boolean': File "%PY2.7%/univention/admin/handlers/__init__.py", line 466, in __getitem__ elif key not in self.__no_default and self.descriptions[key].editable: KeyError: 'sytax'
Currently building univention-management-console-module-udm 9.0.6-5A~4.4.0.201903051205
Created attachment 9887 [details] Screenshot: Layout messed up
Created attachment 9888 [details] Screenshot: Icon wrong
It is very strange/odd now and I can't explain what's the cause but: * The icon for some apps is wrong now (Guacomole shows RocketChat icon). * The tab name is wrong (Open-Xchange is called Guacomole) * The widgets are on the wrong tab (openprojectActivated is shown on the OX tab) * Why is Open-Xchange even affected? It's not using the "UMCOptionsAttributes".
This was because you had several settings/extended_options in your domain. Currently, this cannot happen. But if we want to migrate existing Apps, we should not render those twice... Fixed in univention-management-console-module-udm 9.0.7-3A~4.4.0.201903051639
I think commit 848cd19e1adec7192b2aa4dcc2c647dbcccb2bec broke: 69_udm-syntax/20_ucrwidget http://jenkins.knut.univention.de:8080/job/UCS-4.4/job/UCS-4.4-0/job/AutotestUpgrade/lastCompletedBuild/SambaVersion=s4,Systemrolle=master/testReport/69_udm-syntax/20_ucrwidget/test/ Could you take a look? The test checks if it is possible to override umc widgets through ucr which is used by IN8. Currently this does not seem to work. I might be using extended_attribute wrong in the test.
Created attachment 9896 [details] Still wrong icon
root@master5:/var/www/univention/js/dijit/themes/umc/icons/scalable# ls guacamole* -l lrwxrwxrwx 1 root root 34 Mär 6 00:23 guacamoleActivated.svg -> apps-rocketchat_20190128160726.svg lrwxrwxrwx 1 root root 33 Mär 4 10:13 guacamoleUser.svg -> apps-guacamole_20180525181438.svg
(In reply to Florian Best from comment #10) > Created attachment 9896 [details] > Still wrong icon Error in Test App Center ini files.
(In reply to Jürn Brodersen from comment #9) > I think commit 848cd19e1adec7192b2aa4dcc2c647dbcccb2bec broke: > 69_udm-syntax/20_ucrwidget > http://jenkins.knut.univention.de:8080/job/UCS-4.4/job/UCS-4.4-0/job/ > AutotestUpgrade/lastCompletedBuild/SambaVersion=s4,Systemrolle=master/ > testReport/69_udm-syntax/20_ucrwidget/test/ > > Could you take a look? > The test checks if it is possible to override umc widgets through ucr which > is used by IN8. Currently this does not seem to work. I might be using > extended_attribute wrong in the test. I checked it, yes, the test case was broken by the changes.
The tabs are not sorted by names anymore. Order is e.g. Open-Xchange, Nextcloud, owncloud. Can be ignored?
IMHO the UDM UMC module should not depend on the AppCenter (talking about the appcenter import in udm_ldap.AppAttributes). One is a frontend for a general LDAP abstraction, the other a networked package manager and configuration system. It looks to me like a layering breach. At least it should not be so tightly coupled! But if it must be done this way, then please add the dependency to the Debian "control" file.
(In reply to Daniel Tröder from comment #15) Yes, that's also my opinion. It would be nice if the appcenter could store these relevant information somewhere, for example in UCR variables.
Fixed in univention-management-console-module-udm 9.0.10-3A~4.4.0.201903071539 Test adjusted in ucs-test 9.0.2-7A~4.4.0.201903071535
Commit 5e9c7a17 (Bug #48839: Hide widgets that shall not be visible in UMC) is not complete. The LDAP browser of the UMC sets the value of boolean False to '0' not None/False, so line 205 should be something like: - if _obj['disableUDMWeb']: + if _obj['disableUDMWeb'] == '1':
Fixed in univention-management-console-module-udm 9.0.10-5A~4.4.0.201903080208
I adjusted the implementation so that it allows an alias for the option name, so that it doesn't need to be foobarActivated but foobarUser. This is required for user templates which store an option name. univention-appcenter (8.0.11-1) 244541eb7814 | Bug #48839: allow attribute:option syntax for app.umc_options_attributes univention-management-console-module-udm (9.0.11-1) 3bbfe4c58dd6 | Bug #48839: use attribute:option syntax for app.umc_options_attributes
OK: app tabs are displayed OK: thread safety (cache is set as atomic operation) OK: univention.admin.modules.init() only called once OK: cache is only set in case everything works to prevent half-set states OK: changelog
UCS 4.4 has been released: https://docs.software-univention.de/release-notes-4.4-0-en.html https://docs.software-univention.de/release-notes-4.4-0-de.html If this error occurs again, please use "Clone This Bug".