Added deletable element interface
authorThierry Florac <thierry.florac@onf.fr>
Tue, 28 Nov 2017 17:26:16 +0100
changeset 298 42f146b4d946
parent 297 4f385d0a5ce7
child 299 70de02fd0cd1
Added deletable element interface
src/pyams_content/shared/common/interfaces/__init__.py
--- a/src/pyams_content/shared/common/interfaces/__init__.py	Tue Nov 28 17:25:50 2017 +0100
+++ b/src/pyams_content/shared/common/interfaces/__init__.py	Tue Nov 28 17:26:16 2017 +0100
@@ -33,6 +33,13 @@
 from pyams_content import _
 
 
+class IDeletableElement(Interface):
+    """Deletable element interface"""
+
+    def is_deletable(self):
+        """Check to know if a site element can be deleted"""
+
+
 class IBaseContentManagerRoles(Interface):
     """Shared tool roles interface"""
 
@@ -59,7 +66,7 @@
                                  required=False)
 
 
-class ISharedSite(IBaseContent):
+class ISharedSite(IBaseContent, IDeletableElement):
     """Shared site interface"""
 
     containers(ISiteRoot)