Skip to content
New issue

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

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

Already on GitHub? Sign in 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

Conversation

gotcha
Copy link
Member

@gotcha gotcha commented Nov 16, 2023

Fix for #3871

This still needs tests in order to avoid regression again.

@mister-roboto
Copy link

@gotcha thanks for creating this Pull Request and helping to improve Plone!

TL;DR: Finish pushing changes, pass all other checks, then paste a comment:

@jenkins-plone-org please run jobs

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically.

Happy hacking!

Copy link
Member

@davisagli davisagli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gotcha Thanks for this fix. Would you be willing to add the test?

Products/CMFPlone/__init__.py Outdated Show resolved Hide resolved
@mauritsvanrees mauritsvanrees marked this pull request as ready for review February 21, 2024 16:53
Copy link
Member

@mauritsvanrees mauritsvanrees left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A test would indeed be nice, but master does not have it either. Can be added later. I have marked this PR as ready for review.

@jenkins-plone-org please run jobs

@davisagli
Copy link
Member

Please do add a test. I was working with this setting recently to enable the check for a project, and I found the naming is quite confusing. The test can probably be something like this

    def setUp(self):
        self.app = self.layer["app"]
        self.portal = self.layer["portal"]
        self.portal_url = self.portal.absolute_url()
        setRoles(self.portal, TEST_USER_ID, ["Manager"])

        api.content.create(
            container=self.portal,
            type="Document",
            id="page",
        )

        transaction.commit()
        self.api_session = RelativeSession(self.portal_url)
        self.api_session.auth = (SITE_OWNER_NAME, SITE_OWNER_PASSWORD)

    def test_acquired_object_returns_200(self):
        response = self.api_session.get("/page/page")
        self.assertEqual(response.status_code, 200)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants