Bug 843932 - UI is quirky with users with no real name
Summary: UI is quirky with users with no real name
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: CloudForms Cloud Engine
Classification: Retired
Component: aeolus-conductor
Version: 1.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
Assignee: Matt Wagner
QA Contact: Rehana
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-27 17:41 UTC by Matt Wagner
Modified: 2012-12-04 15:15 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Users without a first or last name caused the Users UI to render incorrectly. This fix displays the username in the Users UI if the first and last names are unavailable. The Users UI now renders correctly.
Clone Of:
Environment:
Last Closed: 2012-12-04 15:15:46 UTC
Embargoed:


Attachments (Terms of Use)
Screenshot with LDAP user with no real name (202.28 KB, image/png)
2012-07-27 17:41 UTC, Matt Wagner
no flags Details
ldap_user (61.69 KB, image/png)
2012-10-01 21:25 UTC, Shveta
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2012:1516 0 normal SHIPPED_LIVE CloudForms Cloud Engine 1.1 update 2012-12-04 19:51:45 UTC

Description Matt Wagner 2012-07-27 17:41:12 UTC
Created attachment 600840 [details]
Screenshot with LDAP user with no real name

Description of problem:
If a user has no real name (first or last), the UI looks pretty bad. This is possible when using LDAP.


Version-Release number of selected component (if applicable):
I'm at aeolus-conductor-0.11.0-0.20120727154838git956bed8.fc16.noarch (upstream) but strongly suspect this occurs in all builds.


How reproducible:
100%


Steps to Reproduce:
1. Set up Conductor to use LDAP authentication scheme.
2. Log in as a user with no real name specified in LDAP.
3. Wince.


Actual results:
- User's name in header (next to "My Account") is an empty little box
- User card in /account is ugly


Expected results:
- User's name in header conditionally shows _something_, probably username -- e.g., "#{user.first_name} #{user.last_name}" || "#{user.login}"
- User card shows something in this case, whether it's an   to just avoid formatting problems, or something like "(No name set)".

Comment 1 Matt Wagner 2012-07-27 17:47:30 UTC
And one minor addition -- we also need to call .strip on the resultant string. I'm now logged in as as an LDAP admin who only has a first name -- "Administrator". But since we show first-name space last-name, it displays as "Administrator " which causes the name to display off-center.

Comment 2 Matt Wagner 2012-08-31 18:06:48 UTC
Pull request sent: https://github.com/aeolusproject/conductor/pull/27

Comment 3 Matt Wagner 2012-09-06 15:12:16 UTC
On master and 1.1:

commit 1354d28f88ec09f6fc3de472ab6cbb048517b897
Author: Matt Wagner <matt.wagner>
Date:   Fri Aug 31 13:26:05 2012 -0400

    Update UI to show user.login if user.name is unavailable
    
    This intentionally only changes instances where this is expected
    behavior, but not in a table where we list login name and real
    name separately.
    (cherry picked from commit 057cc346870adce151a134b008d85d41ee784a52)

commit 064996ee920c17d164899a249cb0f08a796012d6
Author: Matt Wagner <matt.wagner>
Date:   Fri Aug 31 13:08:46 2012 -0400

    format_user_name helper; user.name calls .strip
    
    Adds a format_user_name helper to display login name in the event
    that the user's name is empty (possible with LDAP).
    
    The .name method on user calls ".strip" to eliminate a trailing
    space if the user has no last name (possible with LDAP).
    (cherry picked from commit 7925cf20563a9b32b2a03db988dcbcc46e27ed4c)

Comment 5 Shveta 2012-10-01 21:25:29 UTC
Created attachment 620022 [details]
ldap_user

This bug is fixed now.
As shown in the screenshot Name is displayed at the top beside the "Logout" button
and the User card also displays name if the user doesn't have a first and Last name.

rpm -qa|grep aeolus
aeolus-conductor-0.13.14-1.el6cf.noarch
aeolus-configure-2.8.7-1.el6cf.noarch
aeolus-all-0.13.14-1.el6cf.noarch
aeolus-conductor-doc-0.13.14-1.el6cf.noarch
rubygem-aeolus-cli-0.7.2-1.el6cf.noarch
aeolus-conductor-daemons-0.13.14-1.el6cf.noarch
rubygem-aeolus-image-0.3.0-12.el6.noarch

Comment 7 errata-xmlrpc 2012-12-04 15:15:46 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, and where to find the updated
files, follow the link below.

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

http://rhn.redhat.com/errata/RHEA-2012-1516.html


Note You need to log in before you can comment on or make changes to this bug.