[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:
Denis Ledoux 2015-07-08 14:14:11 +02:00
parent 905dd88ce4
commit d08facdcb5
1 changed files with 1 additions and 1 deletions

View File

@ -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 = {