summaryrefslogtreecommitdiff
path: root/src/leap/gui/wizard.py
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-06-21 15:31:24 -0300
committerTomás Touceda <chiiph@leap.se>2013-06-21 15:38:37 -0300
commit440f2036e36985e9536644b28af0e62cea8704eb (patch)
tree525ae3a14c12b63f98c4c2fd8b4fdc3f09247b2e /src/leap/gui/wizard.py
parent4cfe344fceb16d19936fa8d0d2f6bdaa7e747740 (diff)
Disable remembering when not using a proper keyring backend
Diffstat (limited to 'src/leap/gui/wizard.py')
-rw-r--r--src/leap/gui/wizard.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/leap/gui/wizard.py b/src/leap/gui/wizard.py
index 066a7db3..34eba84c 100644
--- a/src/leap/gui/wizard.py
+++ b/src/leap/gui/wizard.py
@@ -31,6 +31,7 @@ from leap.config.providerconfig import ProviderConfig
from leap.crypto.srpregister import SRPRegister
from leap.util.privilege_policies import is_missing_policy_permissions
from leap.util.request_helpers import get_content
+from leap.util.keyring_helpers import has_keyring
from leap.services.eip.providerbootstrapper import ProviderBootstrapper
from leap.services import get_available
@@ -170,7 +171,7 @@ class Wizard(QtGui.QWizard):
return self._password
def get_remember(self):
- return self.ui.chkRemember.isChecked()
+ return has_keyring() and self.ui.chkRemember.isChecked()
def get_services(self):
return self._selected_services
@@ -286,8 +287,9 @@ class Wizard(QtGui.QWizard):
self._set_registration_fields_visibility(False)
# Allow the user to remember his password
- self.ui.chkRemember.setVisible(True)
- self.ui.chkRemember.setEnabled(True)
+ if has_keyring():
+ self.ui.chkRemember.setVisible(True)
+ self.ui.chkRemember.setEnabled(True)
self.page(self.REGISTER_USER_PAGE).set_completed()
self.button(QtGui.QWizard.BackButton).setEnabled(False)