Use fetchLock() instead of isLockedBy() to avoid 403 errors

Created on 19 February 2025, 3 months ago

Problem/Motivation

If "Content" is not enabled in the Content Lock config form, it returns a 403 error when trying to add a block

Steps to reproduce

- Install the module
- Disable "Content" from the Content Lock module configuration form
- Try to edit layout builder inside a node (i.e. landing page)
- See 403 error in browser console

Proposed resolution

Use fetchLock() instead of isLockedBy() from ContentLock.php to verify that a lock exists and that the user is the owner of the lock

🐛 Bug report
Status

Active

Version

1.2

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024