Bug 843932 - UI is quirky with users with no real name
UI is quirky with users with no real name
Status: CLOSED ERRATA
Product: CloudForms Cloud Engine
Classification: Red Hat
Component: aeolus-conductor (Show other bugs)
1.0.0
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Matt Wagner
Rehana
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-27 13:41 EDT by Matt Wagner
Modified: 2012-12-04 10:15 EST (History)
4 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-04 10:15:46 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Matt Wagner 2012-07-27 13:41:12 EDT
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 13:47:30 EDT
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 14:06:48 EDT
Pull request sent: https://github.com/aeolusproject/conductor/pull/27
Comment 3 Matt Wagner 2012-09-06 11:12:16 EDT
On master and 1.1:

commit 1354d28f88ec09f6fc3de472ab6cbb048517b897
Author: Matt Wagner <matt.wagner@redhat.com>
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@redhat.com>
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 17:25:29 EDT
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 10:15:46 EST
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.