summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2014-04-23 16:22:01 -0300
committerTomás Touceda <chiiph@leap.se>2014-04-23 16:22:01 -0300
commit8b3bd20e60daa76e37548663ec1655df7ccebadd (patch)
tree15eea52e31e3ac81f783af0d8acce3dec95c04b6
parentaba9ce575bebc4bcae72acc3c22ee95b35c5d7c2 (diff)
parent48406e9fb4a789eb6b4f14b626332e89b53d7312 (diff)
Merge remote-tracking branch 'refs/remotes/ivan/bug/5540_change-password-does-not-work' into develop
-rw-r--r--changes/bug-5540_change-password-does-not-work1
-rw-r--r--src/leap/bitmask/gui/mainwindow.py4
-rw-r--r--src/leap/bitmask/gui/preferenceswindow.py14
3 files changed, 12 insertions, 7 deletions
diff --git a/changes/bug-5540_change-password-does-not-work b/changes/bug-5540_change-password-does-not-work
new file mode 100644
index 00000000..ce62ba8c
--- /dev/null
+++ b/changes/bug-5540_change-password-does-not-work
@@ -0,0 +1 @@
+- Change password doesn't work. Closes #5540.
diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py
index e4443434..3a94a58d 100644
--- a/src/leap/bitmask/gui/mainwindow.py
+++ b/src/leap/bitmask/gui/mainwindow.py
@@ -585,9 +585,11 @@ class MainWindow(QtGui.QMainWindow):
Displays the preferences window.
"""
+ user = self._login_widget.get_user()
+ prov = self._login_widget.get_selected_provider()
preferences = PreferencesWindow(
self, self._backend, self._provider_config, self._soledad,
- self._login_widget.get_selected_provider())
+ user, prov)
self.soledad_ready.connect(preferences.set_soledad_ready)
preferences.show()
diff --git a/src/leap/bitmask/gui/preferenceswindow.py b/src/leap/bitmask/gui/preferenceswindow.py
index 014a0a4f..2947c5db 100644
--- a/src/leap/bitmask/gui/preferenceswindow.py
+++ b/src/leap/bitmask/gui/preferenceswindow.py
@@ -43,7 +43,8 @@ class PreferencesWindow(QtGui.QDialog):
"""
preferences_saved = QtCore.Signal()
- def __init__(self, parent, backend, provider_config, soledad, domain):
+ def __init__(self, parent, backend, provider_config,
+ soledad, username, domain):
"""
:param parent: parent object of the PreferencesWindow.
:parent type: QWidget
@@ -53,6 +54,8 @@ class PreferencesWindow(QtGui.QDialog):
:type provider_config: ProviderConfig
:param soledad: Soledad instance
:type soledad: Soledad
+ :param username: the user set in the login widget
+ :type username: unicode
:param domain: the selected domain in the login widget
:type domain: unicode
"""
@@ -63,6 +66,7 @@ class PreferencesWindow(QtGui.QDialog):
self._settings = LeapSettings()
self._soledad = soledad
self._provider_config = provider_config
+ self._username = username
self._domain = domain
self._backend_connect()
@@ -191,7 +195,7 @@ class PreferencesWindow(QtGui.QDialog):
Changes the user's password if the inputboxes are correctly filled.
"""
- username = self._srp_auth.get_username()
+ username = self._username
current_password = self.ui.leCurrentPassword.text()
new_password = self.ui.leNewPassword.text()
new_password2 = self.ui.leNewPassword2.text()
@@ -416,12 +420,10 @@ class PreferencesWindow(QtGui.QDialog):
sig.srp_password_change_ok.connect(self._change_password_ok)
- pwd_change_error = partial(
- self._change_password_problem,
+ pwd_change_error = lambda: self._change_password_problem(
self.tr("There was a problem changing the password."))
sig.srp_password_change_error.connect(pwd_change_error)
- pwd_change_badpw = partial(
- self._change_password_problem,
+ pwd_change_badpw = lambda: self._change_password_problem(
self.tr("You did not enter a correct current password."))
sig.srp_password_change_badpw.connect(pwd_change_badpw)