summaryrefslogtreecommitdiff
path: root/addons/website_forum/controllers/main.py
diff options
context:
space:
mode:
authorJeremy Kersten <jke@odoo.com>2016-02-01 10:03:18 +0100
committerJeremy Kersten <jke@odoo.com>2016-02-01 12:16:43 +0100
commitf39e5358bc6dbb93a34fb52488840eec4f16f54b (patch)
tree81659fd0009dc94146e5b34f889ddad9f947bdcb /addons/website_forum/controllers/main.py
parent22c80fff6e98e4529a55f03c9ab2602c3361d2df (diff)
[FIX] website_forum: decrease indexed pages which will return 404
Add filter in domain converter to remove some posts in sitemap. Avoid to add in sitemap some pages that could not be read by public user due to a karma restriction.
Diffstat (limited to 'addons/website_forum/controllers/main.py')
-rw-r--r--addons/website_forum/controllers/main.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/addons/website_forum/controllers/main.py b/addons/website_forum/controllers/main.py
index 449ce6a758d..5d697e18e68 100644
--- a/addons/website_forum/controllers/main.py
+++ b/addons/website_forum/controllers/main.py
@@ -220,9 +220,8 @@ class WebsiteForum(http.Controller):
except URLError:
return False
- @http.route(['''/forum/<model("forum.forum"):forum>/question/<model("forum.post", "[('forum_id','=',forum[0]),('parent_id','=',False)]"):question>'''], type='http', auth="public", website=True)
+ @http.route(['''/forum/<model("forum.forum"):forum>/question/<model("forum.post", "[('forum_id','=',forum[0]),('parent_id','=',False),('can_view', '=', True)]"):question>'''], type='http', auth="public", website=True)
def question(self, forum, question, **post):
-
# Hide posts from abusers (negative karma), except for moderators
if not question.can_view:
raise werkzeug.exceptions.NotFound()