#985 Mismatching attribute names for user's city
Closed: Fixed None Opened 13 years ago by edewata.

Currently the parameter for user's city is defined as follows in user.py:

Str('locality?',[[BR]]
cli_name='city',[[BR]]
label=_('City'),[[BR]]
)[[BR]]

This leads to a mismatch because while the directory server can accept values using the long attribute name 'locality' it will return the values using the short attribute name 'l'. The CLI and Web UI don't handle this mismatch properly.

Steps to reproduce:

  1. Set the city of a user:

% ipa user-mod testuser --city=Austin

  1. Pull all user's info:

% ipa user-show testuser --all

dn: uid=testuser,cn=users,cn=accounts,dc=ipa[[BR]]
User login: testuser[[BR]]
...[[BR]]
l: Austin[[BR]]

Actual result: The city is returned in an 'l' attribute.

Expected result: The city should be displayed using the proper label (i.e. City: Austin).

Proposed solution: Change the parameter definition to use 'l' instead of 'locality'. The 'l' is also currently used in host.py.


Metadata Update from @edewata:
- Issue assigned to rcritten
- Issue set to the milestone: FreeIPA 2.0.2 RC2 (bug fixing)

7 years ago

Login to comment on this ticket.

Metadata