Added permission to access file internal properties
authorThierry Florac <thierry.florac@onf.fr>
Fri, 13 Oct 2017 08:57:32 +0200
changeset 63 c2b008c96f88
parent 62 cd4af122cd93
child 64 ec939bc6a1ef
Added permission to access file internal properties
src/pyams_file/zmi/file.py
--- a/src/pyams_file/zmi/file.py	Fri Oct 13 08:56:41 2017 +0200
+++ b/src/pyams_file/zmi/file.py	Fri Oct 13 08:57:32 2017 +0200
@@ -19,7 +19,7 @@
 from pyams_file.interfaces import IFile, IFileInfo, IFileModifierForm
 from pyams_skin.interfaces.viewlet import IContextActions
 from pyams_skin.layer import IPyAMSLayer
-from pyams_utils.interfaces import VIEW_PERMISSION
+from pyams_utils.interfaces import VIEW_PERMISSION, MANAGE_SYSTEM_PERMISSION
 
 # import packages
 from pyams_file.zmi import FileModifierAction
@@ -35,7 +35,7 @@
 
 
 @viewlet_config(name='file.properties.action', context=IFile, layer=IPyAMSLayer, view=Interface,
-                manager=IContextActions, weight=1)
+                manager=IContextActions, permission=MANAGE_SYSTEM_PERMISSION, weight=1)
 class FilePropertiesAction(FileModifierAction):
     """File properties action"""