diff --git a/Products/CMFPlone/PropertiesTool.py b/Products/CMFPlone/PropertiesTool.py index d8ce537a1d..2fde5d0c32 100644 --- a/Products/CMFPlone/PropertiesTool.py +++ b/Products/CMFPlone/PropertiesTool.py @@ -19,6 +19,7 @@ from zope.component import getUtility from zope.component import queryUtility from Products.CMFCore.interfaces import ISiteRoot +from zope.deprecation import deprecate @implementer(IPropertiesTool) @@ -106,6 +107,15 @@ def title(self): def smtp_server(self): return getUtility(IMailHost).smtp_host + + @deprecate( + "The portal portal_properties tool will be removed. " + "Use the portal_registry instead." + ) + def hasProperty(self, id): + return super().hasProperty(id) + + InitializeClass(PropertiesTool) @@ -125,4 +135,12 @@ def __init__(self, id, title=''): manage_options = (PropertyManager.manage_options + SimpleItem.manage_options) + @deprecate( + "The portal portal_properties tool will be removed. " + "Use the portal_registry instead." + ) + def hasProperty(self, id): + return super().hasProperty(id) + + InitializeClass(SimpleItemWithProperties) diff --git a/news/125.bugfix b/news/125.bugfix new file mode 100644 index 0000000000..951a089444 --- /dev/null +++ b/news/125.bugfix @@ -0,0 +1 @@ +Deprecate the portal_properties tool