diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2015-03-23 21:47:26 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2015-03-23 21:47:26 +0100 |
commit | 89ad1ea47e3feaee8525a25980e33f2a289c039a (patch) | |
tree | 529fae8d8b1ba3a7de8726707d63e7a5ae69c3ec /pyaggr3g470r/views | |
parent | Previous commit is useless... (diff) | |
download | newspipe-89ad1ea47e3feaee8525a25980e33f2a289c039a.tar.gz newspipe-89ad1ea47e3feaee8525a25980e33f2a289c039a.tar.bz2 newspipe-89ad1ea47e3feaee8525a25980e33f2a289c039a.zip |
The manual retrieving of news is solely available for administrator, on the Heroku platform.
Diffstat (limited to 'pyaggr3g470r/views')
-rw-r--r-- | pyaggr3g470r/views/views.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pyaggr3g470r/views/views.py b/pyaggr3g470r/views/views.py index 9aefd6b1..dc6bfead 100644 --- a/pyaggr3g470r/views/views.py +++ b/pyaggr3g470r/views/views.py @@ -264,8 +264,12 @@ def fetch(feed_id=None): Triggers the download of news. News are downloaded in a separated process, mandatory for Heroku. """ - utils.fetch(g.user.id, feed_id) - flash(gettext("Downloading articles..."), 'info') + if not conf.ON_HEROKU or g.user.is_admin(): + utils.fetch(g.user.id, feed_id) + flash(gettext("Downloading articles..."), "info") + else: + flash(gettext("The manual retrieving of news is only available " + + "for administrator, on the Heroku platform."), "info") return redirect(redirect_url()) @app.route('/about', methods=['GET']) |