Skip to content

Commit

Permalink
Merge pull request #3645 from plone/deprecate_portal_propertiies
Browse files Browse the repository at this point in the history
Deprecate the portal_properties tool
  • Loading branch information
ale-rt authored Sep 19, 2022
2 parents 7e9a854 + b32a673 commit c3e9a33
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Products/CMFPlone/PropertiesTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from Products.PageTemplates.PageTemplateFile import PageTemplateFile
from zope.component import getUtility
from zope.component import queryUtility
from zope.deprecation import deprecate
from zope.interface import implementer


Expand Down Expand Up @@ -105,6 +106,17 @@ def title(self):
def smtp_server(self):
return getUtility(IMailHost).smtp_host


@deprecate(
"The portal portal_properties tool will be removed in Plone 6.1. "
"Use the portal_registry instead. "
"Check https://github.com/plone/Products.CMFPlone/issues/125 "
"for more details."
)
def hasProperty(self, id):
return super().hasProperty(id)


InitializeClass(PropertiesTool)


Expand All @@ -124,4 +136,14 @@ def __init__(self, id, title=''):
manage_options = (PropertyManager.manage_options
+ SimpleItem.manage_options)

@deprecate(
"The portal portal_properties tool will be removed in Plone 6.1. "
"Use the portal_registry instead. "
"Check https://github.com/plone/Products.CMFPlone/issues/125 "
"for more details."
)
def hasProperty(self, id):
return super().hasProperty(id)


InitializeClass(SimpleItemWithProperties)
1 change: 1 addition & 0 deletions news/125.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Deprecate the portal_properties tool

0 comments on commit c3e9a33

Please sign in to comment.