Redundant 'Unauthorised' message on login page

Bug #1221716 reported by Julie Pichon
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Low
Julie Pichon

Bug Description

The messages-on-login-screen blueprint added an "Unauthorised" message when hitting an error 401. However it seems to be redundant in many cases as a more useful error message about permissions is also displayed. Unless we can provide additional information, it
should probably be removed for this particular use case, or at least we should avoid displaying both messages.

Revision history for this message
Julie Pichon (jpichon) wrote :
Julie Pichon (jpichon)
Changed in horizon:
assignee: nobody → Julie Pichon (jpichon)
importance: Undecided → Low
Revision history for this message
Kun Huang (academicgareth) wrote :

In your example, there're two things to users:

one is the reason of error, "Unauthorized"
another is the message to user, telling them blablabla ...

Those look same but act as different roles. Maybe we could show "Unauthorized" before the message which looks like "I'm telling why you should do this", or use different css on both things, or remove one of them. Keeping consistent is ok

Revision history for this message
Julie Pichon (jpichon) wrote :

I like your suggestion, thanks!

Revision history for this message
Liz Blanchard (lblanchard) wrote :

I completely agree with Kun. I think these two messages can be combined and formatted to say something very clear like "This user doesn't have permissions to access the Administration section. Please log in as another user or go back to the <link>Project Dashboard</link>."

Revision history for this message
Julie Pichon (jpichon) wrote :

I'm not sure about combining them into one since they come from different places -- the URL in the screenshot is just an example and could be anything. I will swap both messages around for now, though if removing the redundant 'Unauthorized' for the time being is the preferred solution, that works for me too.

Additionally, as suggested here what it could look like if we use CSS to highlight the messages differently. Here reusing the colour scheme from the 'info' messages. Thoughts?

Revision history for this message
Julie Pichon (jpichon) wrote :
Changed in horizon:
status: New → In Progress
Revision history for this message
Kun Huang (academicgareth) wrote :

It seems good to me :-)
I'm not good at imagining; we could wait for some more ideas.

Revision history for this message
Julie Pichon (jpichon) wrote :

After thinking about it further, I will propose a patch to remove 'Unauthorized' completely. It's too general, and not overridable (actually due to its location it would override a more specific message that may have been previously set). Unless we can have it provide more information it's not very useful.

Other unwanted places it shows up: I am not logged in and try to hit a direct URL. I get redirected to /auth/login/?next=/project/ correctly but am greeted with an 'Unauthorized' message. I think it's better to simply remove it from the general path for now, and keep the add_logout_reason() mechanism for more specific explanations.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/46035

Julie Pichon (jpichon)
Changed in horizon:
milestone: none → havana-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/46035
Committed: http://github.com/openstack/horizon/commit/202427c1d82106b21789d611b43f85a8c1a13730
Submitter: Jenkins
Branch: master

commit 202427c1d82106b21789d611b43f85a8c1a13730
Author: Julie Pichon <email address hidden>
Date: Wed Sep 11 10:25:15 2013 +0100

    Remove general 'unauthorized' message from middleware

    The message is too general to be useful, and at this late stage it
    could override a more useful message that may have been provided
    earlier.

    Change-Id: If819748f765ce30a71206a15f9874727e459dce8
    Closes-Bug: #1221716

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: havana-rc1 → 2013.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.