Skip to content

Move Classic-UI @@sharing CSRF test to plone.app.layout#4336

Merged
MrTango merged 1 commit into
masterfrom
3953-move-plone-app-workflow-to-plone-app-layout
Jun 4, 2026
Merged

Move Classic-UI @@sharing CSRF test to plone.app.layout#4336
MrTango merged 1 commit into
masterfrom
3953-move-plone-app-workflow-to-plone-app-layout

Conversation

@MrTango

@MrTango MrTango commented May 31, 2026

Copy link
Copy Markdown
Contributor

What

The Classic-UI @@sharing view moved from plone.app.workflow to plone.app.layout, where it is registered on the IPloneAppLayoutLayer browser layer (installed by the plone.app.layout:default profile). The CSRF doctest for that view moves along with it.

  • Removed the "Sharing" CSRF block from Products/CMFPlone/tests/csrf.txt; the surrounding object-actions flow (create → rename → delete) is unchanged.
  • The moved test now lives in plone.app.layout as sharing_csrf.txt, running under the layout functional layer which installs plone.app.layout:default so the layer is active and @@sharing resolves to the real view.

Why

CMFPlone's test fixture does not install plone.app.layout:default, so after the move @@sharing fell back to the raising base view and csrf.txt failed. Real Classic-UI sites are unaffected — plone.classicui already installs plone.app.layout:default.

Coordinated PRs (must be tested together)

  • plone/plone.app.workflow#3953-move-plone-app-workflow-to-plone-app-layout
  • plone/plone.app.layout#3953-move-plone-app-workflow-to-plone-app-layout

Please add this PR to the Jenkins pull-request-6.3-3.10 job alongside the two above.

Tests

  • bin/test -s Products.CMFPlone -t csrf → 1/1 pass
  • bin/test -s plone.app.layout -t sharing_csrf → 1/1 pass

Needs

The sharing view moved to plone.app.layout (registered on IPloneAppLayoutLayer),
so its CSRF doctest moves there too. Drop the sharing block from csrf.txt.
@mister-roboto

Copy link
Copy Markdown

@MrTango 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!

@thet thet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@MrTango MrTango merged commit 3dd1eba into master Jun 4, 2026
10 checks passed
@MrTango MrTango deleted the 3953-move-plone-app-workflow-to-plone-app-layout branch June 4, 2026 11:42
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.

3 participants