summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2016-03-11 13:14:34 +0100
committerRuben Pollan <meskio@sindominio.net>2016-03-11 13:14:34 +0100
commit76df59e41d971a030f3630db96c732efe2577f91 (patch)
tree1940e0482fce9bade1a3fd3b49f73736b39a9e40
parentf9ab2d7c5d2a652e1ffde1f994a3344d5ee657f2 (diff)
[bug] Check if the account is enabled
- Resolves: #7961
-rw-r--r--changes/next-changelog.txt1
-rw-r--r--src/leap/mx/couchdbhelper.py7
2 files changed, 5 insertions, 3 deletions
diff --git a/changes/next-changelog.txt b/changes/next-changelog.txt
index 0e3da74..f34adbd 100644
--- a/changes/next-changelog.txt
+++ b/changes/next-changelog.txt
@@ -18,6 +18,7 @@ Features
Bugfixes
~~~~~~~~
- `#7253 <https://leap.se/code/issues/7253>`_: Use the original message for encryption.
+- `#7961 <https://leap.se/code/issues/7961>`_: Check if the account is enabled.
- `#1235 <https://leap.se/code/issues/1235>`_: Description for the fixed stuff corresponding with issue #1235.
- Bugfix without related issue number.
diff --git a/src/leap/mx/couchdbhelper.py b/src/leap/mx/couchdbhelper.py
index de133d5..e9cf4a4 100644
--- a/src/leap/mx/couchdbhelper.py
+++ b/src/leap/mx/couchdbhelper.py
@@ -100,9 +100,10 @@ class ConnectedCouchDB(client.CouchDB):
pubkey = None
if result["rows"]:
doc = result["rows"][0]["doc"]
- uuid = doc["user_id"]
- if "keys" in doc:
- pubkey = doc["keys"]["pgp"]
+ if doc["enabled"]:
+ uuid = doc["user_id"]
+ if "keys" in doc:
+ pubkey = doc["keys"]["pgp"]
return uuid, pubkey
d.addCallback(_get_uuid_and_pubkey_cbk)