[FIX] website: auth for page/ route

bzr revid: chm@openerp.com-20130926131645-ypzyiwloulruq9fq
This commit is contained in:
Christophe Matthieu 2013-09-26 15:16:45 +02:00
parent 9f58a5c082
commit cc939d65fd
1 changed files with 3 additions and 3 deletions

View File

@ -35,7 +35,7 @@ PIL_MIME_MAPPING = {'PNG': 'image/png', 'JPEG': 'image/jpeg', 'GIF': 'image/gif'
# Completely arbitrary limits
MAX_IMAGE_WIDTH, MAX_IMAGE_HEIGHT = IMAGE_LIMITS = (1024, 768)
class Website(openerp.addons.web.controllers.main.Home):
@website.route('/', type='http', auth="admin")
@website.route('/', type='http', auth="public")
def index(self, **kw):
return self.page("website.homepage")
@ -85,7 +85,7 @@ class Website(openerp.addons.web.controllers.main.Home):
return werkzeug.wrappers.Response(url, mimetype='text/plain')
return werkzeug.utils.redirect(url)
@website.route('/website/theme_change', type='http', auth="admin")
@website.route('/website/theme_change', type='http', auth="admin") # FIXME: auth
def theme_change(self, theme_id=False, **kwargs):
imd = request.registry['ir.model.data']
view = request.registry['ir.ui.view']
@ -107,7 +107,7 @@ class Website(openerp.addons.web.controllers.main.Home):
return request.website.render('website.themes', {'theme_changed': True})
@website.route('/page/<path:path>', type='http', auth="admin")
@website.route('/page/<path:path>', type='http', auth="public")
def page(self, path, **kwargs):
values = {
'path': path,