Updated permissions
authorThierry Florac <thierry.florac@onf.fr>
Thu, 13 Jul 2017 10:39:59 +0200
changeset 27 c344bd9c2d06
parent 26 bc2ecebafbb6
child 28 4d6f12fa60e5
Updated permissions
src/pyams_zmi/control_panel.py
--- a/src/pyams_zmi/control_panel.py	Thu Jul 13 10:38:51 2017 +0200
+++ b/src/pyams_zmi/control_panel.py	Thu Jul 13 10:39:59 2017 +0200
@@ -20,7 +20,7 @@
 from pyams_skin.interfaces import IInnerPage, IPageHeader, IContentHelp
 from pyams_skin.interfaces.container import ITableWithActions
 from pyams_skin.layer import IPyAMSLayer
-from pyams_utils.interfaces import VIEW_SYSTEM_PERMISSION, MANAGE_SYSTEM_PERMISSION
+from pyams_utils.interfaces import MANAGE_SYSTEM_PERMISSION
 from pyams_utils.interfaces.site import IOptionalUtility
 from pyams_zmi.interfaces.menu import IControlPanelMenu, IUtilitiesMenu
 from pyams_zmi.layer import IAdminLayer
@@ -53,7 +53,7 @@
 #
 
 @viewlet_config(name='utilities.menu', layer=IAdminLayer, context=ISite, manager=IControlPanelMenu,
-                permission=VIEW_SYSTEM_PERMISSION, weight=1)
+                permission=MANAGE_SYSTEM_PERMISSION, weight=1)
 @viewletmanager_config(name='utilities.menu', layer=IAdminLayer, context=ISite, provides=IUtilitiesMenu)
 @implementer(IUtilitiesMenu)
 class UtilitiesMenuItem(MenuItem):
@@ -98,7 +98,7 @@
         return list(self.context.getSiteManager().values())
 
 
-@pagelet_config(name='utilities.html', context=ISite, layer=IPyAMSLayer, permission=VIEW_SYSTEM_PERMISSION)
+@pagelet_config(name='utilities.html', context=ISite, layer=IPyAMSLayer, permission=MANAGE_SYSTEM_PERMISSION)
 @implementer(IInnerPage)
 class UtilitiesView(AdminView, ContainerView):
     """Control panel view"""
@@ -201,7 +201,7 @@
 #
 
 @viewlet_config(name='local-registrations.menu', layer=IAdminLayer, context=ISite, manager=IUtilitiesMenu,
-                permission=VIEW_SYSTEM_PERMISSION, weight=1)
+                permission=MANAGE_SYSTEM_PERMISSION, weight=1)
 class LocalRegistrationsMenuItem(MenuItem):
     """Local registrations menu"""
 
@@ -228,7 +228,8 @@
         return list(self.context.getSiteManager().registeredUtilities())
 
 
-@pagelet_config(name='local-registrations.html', context=ISite, layer=IPyAMSLayer, permission=VIEW_SYSTEM_PERMISSION)
+@pagelet_config(name='local-registrations.html', context=ISite, layer=IPyAMSLayer,
+                permission=MANAGE_SYSTEM_PERMISSION)
 @implementer(IInnerPage)
 class LocalRegistrationsView(AdminView, ContainerView):
     """Registrations view"""
@@ -265,7 +266,7 @@
 #
 
 @viewlet_config(name='global-registrations.menu', layer=IAdminLayer, context=ISite, manager=IUtilitiesMenu,
-                permission=VIEW_SYSTEM_PERMISSION, weight=2)
+                permission=MANAGE_SYSTEM_PERMISSION, weight=2)
 class GlobalRegistrationsMenuItem(MenuItem):
     """Global registrations menu"""
 
@@ -292,7 +293,8 @@
         return list(registered_utilities())
 
 
-@pagelet_config(name='global-registrations.html', context=ISite, layer=IPyAMSLayer, permission=VIEW_SYSTEM_PERMISSION)
+@pagelet_config(name='global-registrations.html', context=ISite, layer=IPyAMSLayer,
+                permission=MANAGE_SYSTEM_PERMISSION)
 @implementer(IInnerPage)
 class GlobalRegistrationsView(AdminView, ContainerView):
     """Global registrations view"""