aboutsummaryrefslogtreecommitdiff
path: root/source/pyAggr3g470r.py
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2013-01-10 12:04:44 +0100
committerCédric Bonhomme <kimble.mandel@gmail.com>2013-01-10 12:04:44 +0100
commit7b304e26c7a09676b40c001188c02ef552191c14 (patch)
tree467b3861956a7d0345495fc47464ba729caf99db /source/pyAggr3g470r.py
parentAdded default argument for check_credentials(). (diff)
downloadnewspipe-7b304e26c7a09676b40c001188c02ef552191c14.tar.gz
newspipe-7b304e26c7a09676b40c001188c02ef552191c14.tar.bz2
newspipe-7b304e26c7a09676b40c001188c02ef552191c14.zip
You can now change your password form the /management page.
Diffstat (limited to 'source/pyAggr3g470r.py')
-rwxr-xr-xsource/pyAggr3g470r.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/source/pyAggr3g470r.py b/source/pyAggr3g470r.py
index b54e8a48..fd6f024b 100755
--- a/source/pyAggr3g470r.py
+++ b/source/pyAggr3g470r.py
@@ -54,7 +54,7 @@ import utils
import export
import mongodb
import feedgetter
-from auth import AuthController, require, member_of, name_is
+from auth import AuthController, require, member_of, name_is, change_password
#from qrcode.pyqrnative.PyQRNative import QRCode, QRErrorCorrectLevel, CodeOverflowException
#from qrcode import qr
@@ -518,6 +518,21 @@ class pyAggr3g470r(object):
change_feed_logo.exposed = True
@require()
+ def change_password(self, new_password):
+ """
+ Enables to change the name of a feed.
+ """
+ result = change_password(self.auth.username, new_password)
+ if result:
+ message = "<p>Your password has been changed.</p>"
+ else:
+ message = "<p>Impossible to change the password.</p>"
+ tmpl = lookup.get_template("confirmation.html")
+ return tmpl.render(message=message)
+
+ change_password.exposed = True
+
+ @require()
def delete_article(self, param):
"""
Delete an article.
bgstack15