Use named permission
authorThierry Florac <thierry.florac@onf.fr>
Wed, 07 Oct 2015 18:01:32 +0200
changeset 94 229b0844c578
parent 93 e1bbacb1be22
child 95 cfdcf86462f5
Use named permission
src/pyams_skin/page.py
--- a/src/pyams_skin/page.py	Wed Oct 07 18:01:15 2015 +0200
+++ b/src/pyams_skin/page.py	Wed Oct 07 18:01:32 2015 +0200
@@ -18,6 +18,7 @@
 # import interfaces
 from pyams_skin.interfaces import IInnerPage, IModalPage, IPageHeader, IContentTitle
 from pyams_skin.layer import IPyAMSLayer
+from pyams_utils.interfaces import VIEW_PERMISSION
 
 # import packages
 from pyams_pagelet.pagelet import pagelet_config
@@ -27,7 +28,7 @@
 from zope.interface import implementer, Interface
 
 
-@pagelet_config(name='', layer=IPyAMSLayer, permission='view')
+@pagelet_config(name='', layer=IPyAMSLayer, permission=VIEW_PERMISSION)
 @template_config(template='templates/index.pt')
 class BaseIndexPage(object):
     """Base index page"""