Problem/Motivation
Clear path is refused for a Page layout with page condition.
Steps to reproduce
- Create a profile with clear history enabled
- Create a page layout with condition on page /test
- Edit the layout until history exist
- 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
Issue fork display_builder-3559827
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
Comment #2
mogtofu33 commentedComment #3
pdureau commentedComment #5
pdureau commentedIt 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?
Comment #6
mogtofu33 commented