Added deletable interface methods
authorThierry Florac <thierry.florac@onf.fr>
Tue, 28 Nov 2017 17:27:48 +0100
changeset 301 9bdda3bcd680
parent 300 49e8f3cef75a
child 302 6d86ba0d1ec3
Added deletable interface methods
src/pyams_content/root/zmi/sites.py
--- a/src/pyams_content/root/zmi/sites.py	Tue Nov 28 17:27:24 2017 +0100
+++ b/src/pyams_content/root/zmi/sites.py	Tue Nov 28 17:27:48 2017 +0100
@@ -135,6 +135,9 @@
     icon_hint = _("Delete shared site")
     permission = MANAGE_SITE_ROOT_PERMISSION
 
+    def has_permission(self, item):
+        return super(SiteTreeTrashColumn, self).has_permission(item) and item.is_deletable()
+
 
 @adapter_config(context=(ISiteRoot, IAdminLayer, SiteTreeTable), provides=IValues)
 class SiteTreValuesAdapter(ContextRequestViewAdapter):