summaryrefslogtreecommitdiffstats
path: root/module/web/json_app.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/web/json_app.py')
-rw-r--r--module/web/json_app.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/module/web/json_app.py b/module/web/json_app.py
index 738f5ac63..39cd81f5f 100644
--- a/module/web/json_app.py
+++ b/module/web/json_app.py
@@ -415,6 +415,16 @@ def update_accounts():
deleted.append((plugin,user))
PYLOAD.remove_account(plugin, user)
+@route("/json/change_password", method="POST")
+def change_password():
+
+ user = request.POST["user_login"]
+ oldpw = request.POST["login_current_password"]
+ newpw = request.POST["login_new_password"]
+
+ if not PYLOAD.change_password(user, oldpw, newpw):
+ print "Wrong password"
+ return HTTPError()
@route("/json/filemanager/rename", method="POST")
@login_required('filemanager')