diff options
| author | Hiral Bhavsar <hbh@odoo.com> | 2018-01-25 15:19:32 +0530 |
|---|---|---|
| committer | Jeremy Kersten <jke@odoo.com> | 2018-04-09 21:57:43 +0200 |
| commit | 5cafed7fab4492211e9aa32daa5f55e73f3e8390 (patch) | |
| tree | a7a36cae885e2be3b83b7d4a3abf9be8c8436302 /addons/website_forum/controllers | |
| parent | bae90d81df7fa0bd229ac042d58ec5a8e4e2bb3b (diff) | |
[IMP] website_forum: better management of archived forum
Before this commit, badge, user,... was available when a forum is archived.
Now we display a msg to explain to the user that the forum has been archived.
Related to task-33955
Diffstat (limited to 'addons/website_forum/controllers')
| -rw-r--r-- | addons/website_forum/controllers/main.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/website_forum/controllers/main.py b/addons/website_forum/controllers/main.py index ac84166d528..4e493e5017e 100644 --- a/addons/website_forum/controllers/main.py +++ b/addons/website_forum/controllers/main.py @@ -234,6 +234,9 @@ class WebsiteForum(http.Controller): @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): + if not forum.active: + return request.render("website_forum.header", {'forum': forum}) + # Hide posts from abusers (negative karma), except for moderators if not question.can_view: raise werkzeug.exceptions.NotFound() |
