aboutsummaryrefslogtreecommitdiff
path: root/src/web/views
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2016-10-07 07:37:19 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2016-10-07 07:37:19 +0200
commit675c893271e4fa1c49a4abf45ced1bb580c03540 (patch)
treed1cbf6f8e261b4767cddf49d96a6b9eb50892bab /src/web/views
parentFetch feeds only if the user do not want to use its own crawler. (diff)
downloadnewspipe-675c893271e4fa1c49a4abf45ced1bb580c03540.tar.gz
newspipe-675c893271e4fa1c49a4abf45ced1bb580c03540.tar.bz2
newspipe-675c893271e4fa1c49a4abf45ced1bb580c03540.zip
An administrator is now able to set the value of 'auto_crawling' for a user.
Diffstat (limited to 'src/web/views')
-rw-r--r--src/web/views/admin.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/web/views/admin.py b/src/web/views/admin.py
index 84e508a2..2ee46066 100644
--- a/src/web/views/admin.py
+++ b/src/web/views/admin.py
@@ -62,7 +62,8 @@ def process_user_form(user_id=None):
user_contr.update({'id': user_id},
{'nickname': form.nickname.data,
'email': form.email.data,
- 'password': form.password.data})
+ 'password': form.password.data,
+ 'automatic_crawling': form.automatic_crawling.data})
user = user_contr.get(id=user_id)
flash(gettext('User %(nick)s successfully updated',
nick=user.nickname), 'success')
@@ -71,6 +72,7 @@ def process_user_form(user_id=None):
user = user_contr.create(nickname=form.nickname.data,
email=form.email.data,
pwdhash=generate_password_hash(form.password.data),
+ automatic_crawling=form.automatic_crawling.data,
is_admin=False,
is_active=True)
flash(gettext('User %(nick)s successfully created',
bgstack15