Updated permission on I18n manager properties
authorThierry Florac <thierry.florac@onf.fr>
Wed, 28 Mar 2018 10:05:41 +0200
changeset 499 d94366d76e08
parent 498 a5fcbde961b9
child 500 cd0c53346edc
Updated permission on I18n manager properties
src/pyams_content/shared/common/zmi/i18n.py
--- a/src/pyams_content/shared/common/zmi/i18n.py	Fri Mar 23 16:21:51 2018 +0100
+++ b/src/pyams_content/shared/common/zmi/i18n.py	Wed Mar 28 10:05:41 2018 +0200
@@ -17,7 +17,7 @@
 
 # import interfaces
 from pyams_content.interfaces import MANAGE_CONTENT_PERMISSION
-from pyams_content.shared.common.interfaces import IWfSharedContent
+from pyams_content.shared.common.interfaces import IWfSharedContent, IManagerRestrictions
 from pyams_form.interfaces.form import IFormContextPermissionChecker
 from pyams_skin.layer import IPyAMSLayer
 
@@ -31,4 +31,6 @@
 class SharedContentLanguageEditFormPermissionChecker(ContextRequestViewAdapter):
     """I18n manager language edit form permission checker"""
 
-    edit_permission = MANAGE_CONTENT_PERMISSION
+    @property
+    def edit_permission(self):
+        return IFormContextPermissionChecker(self.context).edit_permission