Bug 36875

Summary: umcpProgressCommand() does not respect the module flavor
Product: UCS Reporter: Alexander Kläser <klaeser>
Component: UMC (Generic)Assignee: Florian Best <best>
Status: CLOSED FIXED QA Contact: Alexander Kläser <klaeser>
Severity: normal    
Priority: P5 CC: best, damrose, walkenhorst
Version: UCS 4.0   
Target Milestone: UCS 4.0-0-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: Screenshot

Description Alexander Kläser univentionstaff 2014-11-19 13:57:49 CET
Created attachment 6427 [details]
Screenshot

See screenshot.

The ACLs are correct:

> root@unassigned-hostname:~# umc-acls show -u __systemsetup__
> loaded pickle file /var/cache/univention-management-console/acls/__systemsetup__
> Username: __systemsetup__
>      Host: *          Command: setup/*         Flavor: wizard         Options: {}
>      Host: *          Command: lib/server/*    Flavor: wizard         Options: {}

The module XML file is fine, as well.

The problem here is that the progress command does not send the correct flavor (=wizard) along with the request.
Comment 1 Alexander Kläser univentionstaff 2014-11-19 14:08:08 CET
The reason for this is that umc/tools::umcpProgressCommand() does not respect the module flavor when sending the progress requests.
Comment 2 Florian Best univentionstaff 2014-11-25 17:46:53 CET
handleErrors is also not passed to the sub-call. Should this be fixed, too? Fix for flavor would be:

diff --git a/ucs-4.0-0/management/univention-management-console-frontend/umc/tools.js b/ucs-4.0-0/management/univention-management-console-frontend/umc/tools.js
index 0e09475..9adda32 100644
--- a/ucs-4.0-0/management/univention-management-console-frontend/umc/tools.js
+++ b/ucs-4.0-0/management/univention-management-console-frontend/umc/tools.js
@@ -465,7 +465,7 @@ define([
                                        var allData = [];
                                        var splitIdx = commandStr.lastIndexOf('/');
                                        var progressCmd = commandStr.slice(0, splitIdx) + '/progress';
-                                       this.umcpProgressSubCommand(progressCmd, progressID).then(
+                                       this.umcpProgressSubCommand(progressCmd, progressID, undefined, flavor).then(
                                                function() {
                                                        deferred.resolve(allData);
                                                }, function() {
@@ -490,11 +490,11 @@ define([
                        return deferred;
                },
 
-               umcpProgressSubCommand: function(progressCmd, progressID, deferred) {
+               umcpProgressSubCommand: function(progressCmd, progressID, deferred, flavor) {
                        if (deferred === undefined) {
                                deferred = new Deferred();
                        }
-                       this.umcpCommand(progressCmd, {'progress_id' : progressID}).then(
+                       this.umcpCommand(progressCmd, {'progress_id' : progressID}, undefined, flavor).then(
                                lang.hitch(this, function(data) {
                                        deferred.progress(data.result);
                                        if (data.result.finished) {
Comment 3 Florian Best univentionstaff 2014-12-01 12:25:14 CET
fixed in univention-management-console-frontend 4.1.105-4.967.201412011157.
YAML: adjusted
Comment 4 Alexander Kläser univentionstaff 2015-01-22 12:53:40 CET
Changes: OK
YAML entry: OK
Package version: OK
Comment 5 Janek Walkenhorst univentionstaff 2015-01-29 11:50:52 CET
<http://errata.univention.de/ucs/4.0/51.html>