Problem/Motivation

Clear path is refused for a Page layout with page condition.

Steps to reproduce

  1. Create a profile with clear history enabled
  2. Create a page layout with condition on page /test
  3. Edit the layout until history exist
  4. Click the "clear" button

The clear POST will result in 403 access denied.

Because the access go through modules/display_builder_page_layout/src/AccessControlHandler::checkAccess and operation seems to be view. So then the code check for page layout condition and because path is not valid (not /test) we have a 403.

Proposed resolution

Either the operation should be 'update' and not 'view', or something wrong before.

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mogtofu33 created an issue. See original summary.

mogtofu33’s picture

Issue summary: View changes
pdureau’s picture

Assigned: Unassigned » pdureau

pdureau’s picture

Assigned: pdureau » mogtofu33
Status: Active » Needs review
Issue tags: -display_builder-1.0.0-beta2 +display_builder-1.0.0-beta1

It was a simple routing.yml error.

I have also removed a little condition which was forcing the use of a label in the Clear icon. Is it something we would want to enforce?

mogtofu33’s picture

Assigned: mogtofu33 » Unassigned
Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • mogtofu33 committed f63f5d6f on 1.0.x authored by pdureau
    fix: #3559827 Page layout action "clear" access error
    
    By: pdureau
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.