summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2007-10-26 12:35:32 -0400
committerRob Crittenden <rcritten@redhat.com>2007-10-26 12:35:32 -0400
commit28641544e76aa927f030f2cc980c160829e03a3d (patch)
tree7a8336a1025e992f69890aa3af14eb433b333bf5
parent1d746c9fc2683afead918979923e71efb8e1ee7c (diff)
downloadfreeipa-28641544e76aa927f030f2cc980c160829e03a3d.tar.gz
freeipa-28641544e76aa927f030f2cc980c160829e03a3d.tar.xz
freeipa-28641544e76aa927f030f2cc980c160829e03a3d.zip
Set the user password when adding a user
-rw-r--r--ipa-server/ipa-gui/ipagui/subcontrollers/user.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/ipa-server/ipa-gui/ipagui/subcontrollers/user.py b/ipa-server/ipa-gui/ipagui/subcontrollers/user.py
index 794cfaefb..58e6c6ec5 100644
--- a/ipa-server/ipa-gui/ipagui/subcontrollers/user.py
+++ b/ipa-server/ipa-gui/ipagui/subcontrollers/user.py
@@ -173,9 +173,18 @@ class UserController(IPAController):
user_dict['dn_to_info_json'] = kw.get('dn_to_info_json')
#
- # Password change
- # TODO
+ # Set the Password
#
+ if kw.get('userpassword'):
+ try:
+ client.modifyPassword(user_dict['krbprincipalname'], "", kw.get('userpassword'))
+ except ipaerror.IPAError, e:
+ message = "Person successfully created.<br />"
+ message += "There was an error setting the password.<br />"
+ turbogears.flash(message)
+ return dict(form=user_edit_form, user=user_dict,
+ user_groups=user_groups_dicts,
+ tg_template='ipagui.templates.useredit')
#
# Add groups