Use named permissions
authorThierry Florac <thierry.florac@onf.fr>
Wed, 07 Oct 2015 18:01:15 +0200
changeset 93 e1bbacb1be22
parent 92 4c31eb3800a5
child 94 229b0844c578
Use named permissions
src/pyams_skin/container.py
--- a/src/pyams_skin/container.py	Wed Oct 07 18:00:52 2015 +0200
+++ b/src/pyams_skin/container.py	Wed Oct 07 18:01:15 2015 +0200
@@ -18,6 +18,7 @@
 # import interfaces
 from pyams_skin.interfaces.container import IContainerBaseView
 from pyams_skin.layer import IPyAMSLayer
+from pyams_utils.interfaces import MANAGE_PERMISSION
 from zope.container.interfaces import IContainer
 
 # import packages
@@ -46,7 +47,7 @@
 
 
 @view_config(name='delete-element.json', context=IContainer, request_type=IPyAMSLayer,
-             permission='manage', renderer='json', xhr=True)
+             permission=MANAGE_PERMISSION, renderer='json', xhr=True)
 def delete_container_element(request):
     """Delete container element"""
     translate = request.localizer.translate