Bug 44068 - Wrong error message "There are no modules available for the currently authenticated user"
Wrong error message "There are no modules available for the currently authent...
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 4.2
Other Linux
: P5 normal (vote)
: UCS 4.3
Assigned To: Florian Best
Johannes Keiser
: interim-2
Depends on:
Blocks: 46205 46998 46999
  Show dependency treegraph
 
Reported: 2017-03-24 13:22 CET by Daniel Tröder
Modified: 2018-05-14 10:24 CEST (History)
5 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.086
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments
logged in as "student1" (18.63 KB, image/png)
2017-03-24 16:12 CET, Daniel Tröder
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Tröder univentionstaff 2017-03-24 13:22:41 CET
+++ This bug was initially created as a clone of Bug #43899 +++

The titel I wanted to give this bug originally was "Password change self service in UCS 4.2 is not visible enough", but the problem is IMHO more general.

When a normal user logs in, no UMC modules are displayed.
The UI feels _broken_ with only the logo and menu in the top right corner. Even I felt lost and started the dev console.

That the password-change-module is in the hamburger menu is not obvious at all. We cannot assume users read the manual.

I suggest to dynamically create a button / link / text / image / module where normally modules would be or in the pages center, to access the password-change module, in case no modules were loaded for a user.
Comment 1 Erik Damrose univentionstaff 2017-03-24 13:24:11 CET
Another idea: Maybe the menu could be opened by default in that case?
Comment 2 Florian Best univentionstaff 2017-03-24 13:25:30 CET
Please attach a screenshot.
Comment 3 Daniel Tröder univentionstaff 2017-03-24 16:12:53 CET
Created attachment 8641 [details]
logged in as "student1"
Comment 4 Florian Best univentionstaff 2017-03-24 16:15:21 CET
This is the error which I also get from time to time with Administrator:

dojo.js.uncompressed.js:6483 TypeError: Cannot read property 'get' of undefined(…) "TypeError: Cannot read property 'get' of undefined
    at _updateQuery (http://10.200.3.120/univention/management/main.js:1352:51)
    at _setupOverviewPage (http://10.200.3.120/univention/management/main.js:1269:9)
    at setupGui (http://10.200.3.120/univention/management/main.js:1103:9)
    at onLoaded (http://10.200.3.120/univention/management/main.js:1065:9)
    at .<anonymous> (http://10.200.3.120/univention/management/main.js:968:10)
    at http://10.200.3.120/univention/js/dojo/dojo.js:42:499
    at d (http://10.200.3.120/univention/js/dojo/dojo.js:84:297)
    at k (http://10.200.3.120/univention/js/dojo/dojo.js:84:223)
    at b.resolve (http://10.200.3.120/univention/js/dojo/dojo.js:86:296)
    at a (http://10.200.3.120/univention/js/dojo/dojo.js:85:171)
    ----------------------------------------
    rejected at a (http://10.200.3.120/univention/js/dojo/dojo.js:85:197)
    at d (http://10.200.3.120/univention/js/dojo/dojo.js:84:456)
    at k (http://10.200.3.120/univention/js/dojo/dojo.js:84:223)
    at b.resolve (http://10.200.3.120/univention/js/dojo/dojo.js:86:296)
    at a (http://10.200.3.120/univention/js/dojo/dojo.js:85:171)
    at d (http://10.200.3.120/univention/js/dojo/dojo.js:84:437)
    at k (http://10.200.3.120/univention/js/dojo/dojo.js:84:223)
    at b.resolve (http://10.200.3.120/univention/js/dojo/dojo.js:86:296)
    at http://10.200.3.120/univention/js/dojo/dojo.js:83:365
    at d (http://10.200.3.120/univention/js/dojo/dojo.js:84:297)
    ----------------------------------------
Error
    at then.c.then (http://10.200.3.120/univention/js/dojo/dojo.js:87:111)
    at load (http://10.200.3.120/univention/management/main.js:965:24)
    at _authenticated (http://10.200.3.120/univention/management/main.js:811:9)
    at http://10.200.3.120/univention/js/dojo/dojo.js:42:446
    at http://10.200.3.120/univention/login/main.js:135:29"
Comment 5 Florian Best univentionstaff 2017-03-24 16:41:42 CET
In svn r78306 I fixed that at least the pop up is shown again, saying "There are no modules available for the currently authenticated user".
Comment 6 Florian Best univentionstaff 2018-01-24 23:56:59 CET
Okay, I got the error.
This can be reproduced with "pkill -f console-module" while the user is logged in via SAML and a page refresh in chromium via Ctrl-R and disabled caching.
Then the /univention/get/meta call is done first which causes a new session to be created in the UMC-Webserver but not as the logged in user but as an anonymous user. An anonymous user has no permissions for any modules thus the error message.

I saw this myself in various customer environments.
Sönke, you came to me a few weeks ago with the same problem (happened at a specific customter ;-)).

I will fix it for UCS 4.3. You can backport if necessary.

The fix is simply doing the authentication before sending the request if we detect that a anonymous session already exists.
Comment 7 Florian Best univentionstaff 2018-01-25 00:03:33 CET
I will give Johannes the QA.

changelog-4.3-0.xml
a0e3ba7824f4 | Changelog Bug #44068

univention-management-console (10.0.2-1)
62e40c5f285a | Bug #44068: fix required authentication before sending requests to the UMC-Server
Comment 8 Johannes Keiser univentionstaff 2018-01-31 15:11:26 CET
The original problem from the Bug description is not addressed with this fix.
A clone of this bug for the original problem has been created.

OK the error from comment #4 and #6 is resolved
OK code review
-> verified
Comment 9 Stefan Gohmann univentionstaff 2018-03-14 14:37:59 CET
UCS 4.3 has been released:
 https://docs.software-univention.de/release-notes-4.3-0-en.html
 https://docs.software-univention.de/release-notes-4.3-0-de.html

If this error occurs again, please use "Clone This Bug".