Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1980809

Summary: Logout reason not displayed on login screen
Product: Red Hat OpenStack Reporter: Radomir Dopieralski <rdopiera>
Component: openstack-dashboard-themeAssignee: Radomir Dopieralski <rdopiera>
Status: CLOSED ERRATA QA Contact: ikanias
Severity: medium Docs Contact:
Priority: medium    
Version: 16.1 (Train)CC: jhajyahy, jschluet
Target Milestone: z8Keywords: Triaged
Target Release: 16.1 (Train on RHEL 8.2)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-dashboard-theme-16.0.3-2.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2058283 (view as bug list) Environment:
Last Closed: 2022-12-07 20:24:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2058283, 2058290    

Description Radomir Dopieralski 2021-07-09 15:12:41 UTC
Description of problem:

With the downstream theme enabled, Horizon does not display the logout reason on the login screen.

How reproducible:

Always.

Steps to Reproduce:
1. Login into Horizon.
2. Change your password.
3. The login screen should show text "Password changed. Please log in again to continue."

Actual results:

The text is not visible anywhere on the login screen.

Expected results:

The text should be visible.

Additional info:

This is probably due to wrong nesting of IF blocks in the _login.html template:

    {% if request.user.is_authenticated and 'next' in request.GET %}
    <div class="control-group clearfix error">
      <span class="help-inline"><p>{% trans "You don't have permissions to access:" %}</p>
        <p><b>{{ request.GET.next }}</b></p>
        <p>{% trans "Login as different user or go back to" %}
        <a href="{% url 'horizon:user_home' %}">{% trans "home page" %}</a></p>
      </span>
    </div>
    {% if request.COOKIES.logout_reason %}
    <div class="form-group clearfix error" id="logout_reason">
        <span class="help-block alert alert-danger"><p>{{ request.COOKIES.logout_reason }}</p></span>
    </div>
    {% endif %}

    {% endif %}

Note that one of the ENDIF statements should be moved to right before the second IF.

Comment 15 errata-xmlrpc 2022-12-07 20:24:45 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat OpenStack Platform 16.1.9 bug fix and enhancement advisory), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:8795