Merge pull request #501 from pcoder/bug/3806/cannot_create_vms_after_password_reset

Fix cannot create vms after password reset
This commit is contained in:
Pcoder 2017-09-25 19:34:39 +00:00 committed by GitHub
commit ed4c968974
4 changed files with 9 additions and 6 deletions

View file

@ -601,8 +601,11 @@ msgstr ""
#, python-format #, python-format
msgid "" msgid ""
"Your Virtual Machine %(virtual_machine.name)s is successfully terminated!" "Your Virtual Machine <strong>%(machine_name)s</strong> is successfully "
msgstr "Deine Virtuelle Machine (VM) %(virtual_machine.name)s wurde erfolgreich beendet!" "terminated!"
msgstr ""
"Deine Virtuelle Machine (VM) <strong>%(machine_name)s</strong> wurde erfolgreich "
"beendet!"
msgid "Virtual Machines" msgid "Virtual Machines"
msgstr "Virtuelle Maschinen" msgstr "Virtuelle Maschinen"

View file

@ -319,7 +319,7 @@ class PasswordResetConfirmView(PasswordResetConfirmViewMixin):
messages.success(request, _('Password has been reset.')) messages.success(request, _('Password has been reset.'))
# Change opennebula password # Change opennebula password
opennebula_client.change_user_password(new_password) opennebula_client.change_user_password(user.password)
return self.form_valid(form) return self.form_valid(form)
else: else:

View file

@ -438,11 +438,11 @@ class OpenNebulaManager():
self.oneadmin_client.call(oca.VmTemplate.METHODS[ self.oneadmin_client.call(oca.VmTemplate.METHODS[
'delete'], template_id, False) 'delete'], template_id, False)
def change_user_password(self, new_password): def change_user_password(self, passwd_hash):
self.oneadmin_client.call( self.oneadmin_client.call(
oca.User.METHODS['passwd'], oca.User.METHODS['passwd'],
self.opennebula_user.id, self.opennebula_user.id,
new_password passwd_hash
) )
def add_public_key(self, user, public_key='', merge=False): def add_public_key(self, user, public_key='', merge=False):

View file

@ -769,7 +769,7 @@ msgid "Message"
msgstr "Nachricht" msgstr "Nachricht"
msgid "The link to reset your email has been sent to your email" msgid "The link to reset your email has been sent to your email"
msgstr "Der Link zum Zur?cksetzen deines Passwortes wurde an deine E-Mail gesendet" msgstr "Der Link zum Zurücksetzen deines Passwortes wurde an deine E-Mail gesendet"
msgid "Password Reset" msgid "Password Reset"
msgstr "Passwort zurücksetzen" msgstr "Passwort zurücksetzen"