Skip to content

Commit

Permalink
Deprecate `etForbiddenContentTypes, to be removed in Plone 7.
Browse files Browse the repository at this point in the history
  • Loading branch information
mauritsvanrees committed Jun 18, 2024
1 parent 96b247b commit 1763943
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions news/125.breaking
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Remove usage of `portal_properties`.
In `getForbiddenContentTypes` we used to check `portal_properties.site_properties.forbidden_contenttypes`.
Remove usage of ``portal_properties``.
In ``getForbiddenContentTypes`` we used to check ``portal_properties.site_properties.forbidden_contenttypes``.
Now we return nothing, so deprecate ``getForbiddenContentTypes``, to be removed in Plone 7.
[maurits]
2 changes: 2 additions & 0 deletions plone/app/vocabularies/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from plone.app.vocabularies import PermissiveVocabulary
from Products.CMFCore.utils import getToolByName
from zope.component.hooks import getSite
from zope.deprecation import deprecate
from zope.i18n import translate
from zope.interface import implementer
from zope.schema.interfaces import IVocabularyFactory
Expand Down Expand Up @@ -37,6 +38,7 @@ def getAllowableContentTypes(context):
return portal_transforms.listAvailableTextInputs()


@deprecate("Returns nothing by default. Will be removed in Plone 7.")
def getForbiddenContentTypes(context):
"""Get forbidden contenttypes.
Expand Down

0 comments on commit 1763943

Please sign in to comment.