--- a/src/pyams_content/component/keynumber/__init__.py Mon Jun 25 10:09:38 2018 +0200
+++ b/src/pyams_content/component/keynumber/__init__.py Mon Jun 25 16:03:54 2018 +0200
@@ -10,7 +10,6 @@
# FOR A PARTICULAR PURPOSE.
#
-
__docformat__ = 'restructuredtext'
@@ -157,6 +156,16 @@
name='++keynumbers++')
+@adapter_config(context=IKeyNumberContainer, provides=IFormContextPermissionChecker)
+class KeyNumberContainerPermissionChecker(ContextAdapter):
+ """Key number container permission checker"""
+
+ @property
+ def edit_permission(self):
+ content = get_parent(self.context, IKeyNumberContainerTarget)
+ return IFormContextPermissionChecker(content).edit_permission
+
+
@adapter_config(name='keynumbers', context=IKeyNumberContainerTarget, provides=ITraversable)
class KeyNumberContainerNamespace(ContextAdapter):
"""Key numbers container ++keynumbers++ namespace"""