From 5f0f192ae3c8aa44868b7b3b86e71523fc55515b Mon Sep 17 00:00:00 2001 From: Kevin McCarthy Date: Fri, 17 Aug 2007 15:32:05 -0700 Subject: change strings to be encoded using value.encode("utf-8"). fix update to set 'cn' instead of 'sn'. remove str() in funcs.add_user(). --- ipa-server/ipa-gui/ipagui/controllers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ipa-server/ipa-gui/ipagui/controllers.py') diff --git a/ipa-server/ipa-gui/ipagui/controllers.py b/ipa-server/ipa-gui/ipagui/controllers.py index ae8b088b..36c1bf84 100644 --- a/ipa-server/ipa-gui/ipagui/controllers.py +++ b/ipa-server/ipa-gui/ipagui/controllers.py @@ -49,7 +49,7 @@ def set_ldap_value(hash, key, value): """Converts unicode strings to normal strings (because LDAP is choking on unicode strings""" if value != None: - value = str(value) + value = value.encode('utf-8') hash[key] = value @@ -137,7 +137,7 @@ class Root(controllers.RootController): # # this is a hack until we decide on the policy for names/cn/sn/givenName # - set_ldap_value(new_user, 'sn', + set_ldap_value(new_user, 'cn', "%s %s" % (kw.get('givenname'), kw.get('sn'))) orig_user = to_ldap_hash(orig_user) -- cgit