Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Actually disable explicit acquisition in Plone 6 #3872

Open
wants to merge 3 commits into
base: 6.0.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions Products/CMFPlone/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,16 @@

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

if __version__ < '7':
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')

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
3 changes: 3 additions & 0 deletions news/3872.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Actually disable explicit acquisition in Plone 6.0
Same as on Plone 6.1.
[gotcha]