[FIX] website: the sitemap must be build with the public user
Otherwise, when accessing `/sitemap.xml` as SUPERUSER for instance, pages not published were displayed in the sitemap. opw-640673
This commit is contained in:
parent
905dd88ce4
commit
d08facdcb5
|
@ -120,7 +120,7 @@ class Website(openerp.addons.web.controllers.main.Home):
|
|||
|
||||
pages = 0
|
||||
first_page = None
|
||||
locs = request.website.enumerate_pages()
|
||||
locs = request.website.sudo(user=request.website.user_id.id).enumerate_pages()
|
||||
while True:
|
||||
start = pages * LOC_PER_SITEMAP
|
||||
values = {
|
||||
|
|
Loading…
Reference in New Issue