summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2011-02-18 00:12:04 -0600
committerAdam Young <ayoung@redhat.com>2011-02-18 10:10:35 -0500
commitfa75959486ddbd0be00f3611457e940215635a3a (patch)
tree85b19febf95849b29daebdbb0212bdab03b51312
parentb26e265961e929547469e37e0f0927d9965b5264 (diff)
downloadfreeipa-fa75959486ddbd0be00f3611457e940215635a3a.zip
freeipa-fa75959486ddbd0be00f3611457e940215635a3a.tar.gz
freeipa-fa75959486ddbd0be00f3611457e940215635a3a.tar.xz
Fixed parameter for user city.
Previously the user's city parameter is defined to use the 'locality' attribute. This was a problem because the attribute would be returned as 'l' by the directory server causing a mismatch. Now the parameter has been changed to use the 'l' attribute.
-rw-r--r--API.txt12
-rw-r--r--ipalib/plugins/user.py4
-rw-r--r--tests/test_xmlrpc/test_user_plugin.py4
3 files changed, 10 insertions, 10 deletions
diff --git a/API.txt b/API.txt
index 1f956ec..6e532da 100644
--- a/API.txt
+++ b/API.txt
@@ -2540,8 +2540,8 @@ option: Password('userpassword', attribute=True, cli_name='password', exclude='w
option: Int('uidnumber', attribute=True, autofill=True, cli_name='uid', default=999, label=Gettext('UID', domain='ipa', localedir=None), minvalue=1, multivalue=False, required=False)
option: Int('gidnumber', attribute=True, cli_name='gidnumber', default_from=DefaultFrom(<lambda>, 'uid'), label=Gettext('GID', domain='ipa', localedir=None), multivalue=False, required=False)
option: Str('street', attribute=True, cli_name='street', label=Gettext('Street address', domain='ipa', localedir=None), multivalue=False, required=False)
-option: Str('locality', attribute=True, cli_name='city', label=Gettext('City', domain='ipa', localedir=None), multivalue=False, required=False)
-option: Str('st', attribute=True, cli_name='state', label=Gettext('State', domain='ipa', localedir=None), multivalue=False, required=False)
+option: Str('l', attribute=True, cli_name='city', label=Gettext('City', domain='ipa', localedir=None), multivalue=False, required=False)
+option: Str('st', attribute=True, cli_name='state', label=Gettext('State/Province', domain='ipa', localedir=None), multivalue=False, required=False)
option: Int('postalcode', attribute=True, cli_name='postalcode', label=Gettext('ZIP', domain='ipa', localedir=None), multivalue=False, required=False)
option: Str('telephonenumber', attribute=True, cli_name='phone', label=Gettext('Telephone Number', domain='ipa', localedir=None), multivalue=True, required=False)
option: Str('mobile', attribute=True, cli_name='mobile', label=Gettext('Mobile Telephone Number', domain='ipa', localedir=None), multivalue=True, required=False)
@@ -2596,8 +2596,8 @@ option: Password('userpassword', attribute=True, autofill=False, cli_name='passw
option: Int('uidnumber', attribute=True, autofill=False, cli_name='uid', default=999, label=Gettext('UID', domain='ipa', localedir=None), minvalue=1, multivalue=False, query=True, required=False)
option: Int('gidnumber', attribute=True, autofill=False, cli_name='gidnumber', default_from=DefaultFrom(<lambda>, 'uid'), label=Gettext('GID', domain='ipa', localedir=None), multivalue=False, query=True, required=False)
option: Str('street', attribute=True, autofill=False, cli_name='street', label=Gettext('Street address', domain='ipa', localedir=None), multivalue=False, query=True, required=False)
-option: Str('locality', attribute=True, autofill=False, cli_name='city', label=Gettext('City', domain='ipa', localedir=None), multivalue=False, query=True, required=False)
-option: Str('st', attribute=True, autofill=False, cli_name='state', label=Gettext('State', domain='ipa', localedir=None), multivalue=False, query=True, required=False)
+option: Str('l', attribute=True, autofill=False, cli_name='city', label=Gettext('City', domain='ipa', localedir=None), multivalue=False, query=True, required=False)
+option: Str('st', attribute=True, autofill=False, cli_name='state', label=Gettext('State/Province', domain='ipa', localedir=None), multivalue=False, query=True, required=False)
option: Int('postalcode', attribute=True, autofill=False, cli_name='postalcode', label=Gettext('ZIP', domain='ipa', localedir=None), multivalue=False, query=True, required=False)
option: Str('telephonenumber', attribute=True, autofill=False, cli_name='phone', label=Gettext('Telephone Number', domain='ipa', localedir=None), multivalue=True, query=True, required=False)
option: Str('mobile', attribute=True, autofill=False, cli_name='mobile', label=Gettext('Mobile Telephone Number', domain='ipa', localedir=None), multivalue=True, query=True, required=False)
@@ -2639,8 +2639,8 @@ option: Password('userpassword', attribute=True, autofill=False, cli_name='passw
option: Int('uidnumber', attribute=True, autofill=False, cli_name='uid', default=999, label=Gettext('UID', domain='ipa', localedir=None), minvalue=1, multivalue=False, required=False)
option: Int('gidnumber', attribute=True, autofill=False, cli_name='gidnumber', default_from=DefaultFrom(<lambda>, 'uid'), label=Gettext('GID', domain='ipa', localedir=None), multivalue=False, required=False)
option: Str('street', attribute=True, autofill=False, cli_name='street', label=Gettext('Street address', domain='ipa', localedir=None), multivalue=False, required=False)
-option: Str('locality', attribute=True, autofill=False, cli_name='city', label=Gettext('City', domain='ipa', localedir=None), multivalue=False, required=False)
-option: Str('st', attribute=True, autofill=False, cli_name='state', label=Gettext('State', domain='ipa', localedir=None), multivalue=False, required=False)
+option: Str('l', attribute=True, autofill=False, cli_name='city', label=Gettext('City', domain='ipa', localedir=None), multivalue=False, required=False)
+option: Str('st', attribute=True, autofill=False, cli_name='state', label=Gettext('State/Province', domain='ipa', localedir=None), multivalue=False, required=False)
option: Int('postalcode', attribute=True, autofill=False, cli_name='postalcode', label=Gettext('ZIP', domain='ipa', localedir=None), multivalue=False, required=False)
option: Str('telephonenumber', attribute=True, autofill=False, cli_name='phone', label=Gettext('Telephone Number', domain='ipa', localedir=None), multivalue=True, required=False)
option: Str('mobile', attribute=True, autofill=False, cli_name='mobile', label=Gettext('Mobile Telephone Number', domain='ipa', localedir=None), multivalue=True, required=False)
diff --git a/ipalib/plugins/user.py b/ipalib/plugins/user.py
index f5eea38..0ea3c23 100644
--- a/ipalib/plugins/user.py
+++ b/ipalib/plugins/user.py
@@ -179,13 +179,13 @@ class user(LDAPObject):
cli_name='street',
label=_('Street address'),
),
- Str('locality?',
+ Str('l?',
cli_name='city',
label=_('City'),
),
Str('st?',
cli_name='state',
- label=_('State'),
+ label=_('State/Province'),
),
Int('postalcode?',
label=_('ZIP'),
diff --git a/tests/test_xmlrpc/test_user_plugin.py b/tests/test_xmlrpc/test_user_plugin.py
index d8d95b9..cacf107 100644
--- a/tests/test_xmlrpc/test_user_plugin.py
+++ b/tests/test_xmlrpc/test_user_plugin.py
@@ -510,7 +510,7 @@ class test_user(Declarative):
desc='Create %r with a full address' % user1,
command=(
'user_add', [user1], dict(givenname=u'Test', sn=u'User1',
- street=u'123 Maple Rd', locality=u'Anytown', st=u'MD',
+ street=u'123 Maple Rd', l=u'Anytown', st=u'MD',
telephonenumber=u'410-555-1212',)
),
expected=dict(
@@ -530,7 +530,7 @@ class test_user(Declarative):
cn=[u'Test User1'],
initials=[u'TU'],
street=[u'123 Maple Rd'],
- locality=[u'Anytown'],
+ l=[u'Anytown'],
st=[u'MD'],
telephonenumber=[u'410-555-1212'],
ipauniqueid=[fuzzy_uuid],