aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2014-06-19 10:26:28 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2014-06-19 10:26:28 +0200
commit840818605c1258aabf6714a835af27bf834dd744 (patch)
tree0149a294b61421df9a6a17ca752fcccb188af228 /pyaggr3g470r
parentMore informations about how to use the web service. (diff)
downloadnewspipe-840818605c1258aabf6714a835af27bf834dd744.tar.gz
newspipe-840818605c1258aabf6714a835af27bf834dd744.tar.bz2
newspipe-840818605c1258aabf6714a835af27bf834dd744.zip
Check if the account of the user is activated when accessing via the Web service.
Diffstat (limited to 'pyaggr3g470r')
-rw-r--r--pyaggr3g470r/rest.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pyaggr3g470r/rest.py b/pyaggr3g470r/rest.py
index 6efa9881..1c597bdd 100644
--- a/pyaggr3g470r/rest.py
+++ b/pyaggr3g470r/rest.py
@@ -51,7 +51,7 @@ def authenticate(func):
try:
email = auth.username
user = User.query.filter(User.email == email).first()
- if user and user.check_password(auth.password):
+ if user and user.check_password(auth.password) and user.activation_key == "":
g.user = user
return func(*args, **kwargs)
except AttributeError:
@@ -122,4 +122,4 @@ class ArticleAPI(Resource):
"""
pass
-api.add_resource(ArticleAPI, '/articles.json/', endpoint = 'articles.json') \ No newline at end of file
+api.add_resource(ArticleAPI, '/articles.json/', endpoint = 'articles.json')
bgstack15