This commit gives the read access to public users to published articles (website_published = True). Task-2674460 Part-of: odoo/odoo#82315 Co-authored-by: Damien Abeloos <abd@odoo.com> Co-authored-by: Julien Banken <jbn@odoo.com> Co-authored-by: David Beguin <dbe@odoo.com> Co-authored-by: Fabio Barbero <faba@odoo.com> Co-authored-by: Thibault Delavallee <tde@odoo.com> Co-authored-by: Aurelien Warnong <awa@odoo.com>
18 lines
653 B
Python
18 lines
653 B
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from odoo import http
|
|
from odoo.addons.knowledge.controllers.main import KnowledgeController
|
|
|
|
|
|
class KnowledgeWebsiteController(KnowledgeController):
|
|
|
|
# Override
|
|
@http.route('/knowledge/article/<int:article_id>', type='http', auth='public', website=True, sitemap=False)
|
|
def redirect_to_article(self, **kwargs):
|
|
return super().redirect_to_article(**kwargs)
|
|
|
|
@http.route('/knowledge/home', type='http', auth='public', website=True, sitemap=False)
|
|
def access_knowledge_home(self):
|
|
return super().access_knowledge_home()
|