Skip to content

Commit

Permalink
explicitacquisition: just copy the code from CMFPlone master.
Browse files Browse the repository at this point in the history
  • Loading branch information
mauritsvanrees committed Feb 21, 2024
1 parent a7323fa commit 5d07a88
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions Products/CMFPlone/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,16 @@

__version__ = pkg_resources.require("Products.CMFPlone")[0].version

if __version__ < '7':
from Products.CMFCore import explicitacquisition
PTA_ENV_KEY = explicitacquisition.PTA_ENV_KEY
os.environ[PTA_ENV_KEY] = os.environ.get(PTA_ENV_KEY, 'false')
explicitacquisition.SKIP_PTA = os.environ.get(PTA_ENV_KEY, "true") == "false"
if __version__ < "7":
# This sets SKIP_PTA to skip the check for
# Publication through acquisition in Plone 6.
# Please remove this code block when can.
import Products.CMFCore.explicitacquisition
from Products.CMFCore.explicitacquisition import PTA_ENV_KEY

os.environ[PTA_ENV_KEY] = os.environ.get(PTA_ENV_KEY, "false")
# Importing (from) the module sets SKIP_PTA. We need to override that too.
Products.CMFCore.explicitacquisition.SKIP_PTA = os.environ[PTA_ENV_KEY] == "false"

cmfplone_globals = globals()
this_module = sys.modules[__name__]
Expand Down

0 comments on commit 5d07a88

Please sign in to comment.