1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-11-30 21:40:00 +00:00

fix for password edit at the admin page

This commit is contained in:
Cervinko Cera 2016-04-03 15:12:48 +02:00
parent a395e9f301
commit a96417f2a5

View File

@ -637,7 +637,7 @@ def edit_user(user_id):
return redirect(url_for('user_list')) return redirect(url_for('user_list'))
else: else:
if to_save["password"]: if to_save["password"]:
content.password == generate_password_hash(to_save["password"]) content.password = generate_password_hash(to_save["password"])
if "admin_user" in to_save and content.role != 1: if "admin_user" in to_save and content.role != 1:
content.role = 1 content.role = 1
elif not "admin_user" in to_save and content.role == 1: elif not "admin_user" in to_save and content.role == 1: