aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2016-11-13 17:36:33 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2016-11-13 17:36:33 +0100
commit4dad282a9553a734c622211560c40b1dd9091b9c (patch)
treef899bb51f0f055dd90e248f88642079ec70e5b3a
parentAdded page for public feeds. (diff)
downloadnewspipe-4dad282a9553a734c622211560c40b1dd9091b9c.tar.gz
newspipe-4dad282a9553a734c622211560c40b1dd9091b9c.tar.bz2
newspipe-4dad282a9553a734c622211560c40b1dd9091b9c.zip
check if feed is private
-rw-r--r--src/web/templates/feed_list_simple.html2
-rw-r--r--src/web/views/feed.py3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/web/templates/feed_list_simple.html b/src/web/templates/feed_list_simple.html
index 3e04ad7e..5f692a53 100644
--- a/src/web/templates/feed_list_simple.html
+++ b/src/web/templates/feed_list_simple.html
@@ -12,7 +12,7 @@
{% for feed in feeds %}
<tr>
<td>{{ loop.index }}</td>
- <td>{% if feed.icon_url %}<img src="{{ url_for('icon.icon', url=feed.icon_url) }}" width="16px" />&nbsp;{% endif %}{{ feed.title }}</td>
+ <td>{% if feed.icon_url %}<img src="{{ url_for('icon.icon', url=feed.icon_url) }}" width="16px" />&nbsp;{% endif %} <a href="{{ url_for('feed.feed_pub', feed_id=feed.id) }}">{{ feed.title }}</a></td>
<td><a href="{{ feed.site_link }}">{{ feed.site_link }}</a></td>
</tr>
{% endfor %}
diff --git a/src/web/views/feed.py b/src/web/views/feed.py
index 87b47da1..6bc4afe1 100644
--- a/src/web/views/feed.py
+++ b/src/web/views/feed.py
@@ -82,6 +82,9 @@ def feed_pub(feed_id=None):
"""
Presents details of a pubic feed.
"""
+ feed = FeedController(None).get(id=feed_id)
+ if feed.private:
+ return render_template('errors/404.html'), 404
return feed_view(feed_id, None)
bgstack15