Problem/Motivation

Break lock operation is not showing for users without "break content lock" permissions even if the lock is created by user.

Steps to reproduce

  • Create content list view with entity operations
  • Create new node
  • Edit node as user without break content lock permission
  • Break lock is not showing in operations list

Proposed resolution

Add additional check to function content_lock_entity_operation() if lock belongs to current user.

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

jviitamaki created an issue. See original summary.

jviitamaki’s picture

chrisjlock’s picture

StatusFileSize
new655 bytes

Patch not needed for 3.0.0-alpha4; verified working as intended. Root cause was custom code.

alexpott’s picture

Status: Active » Needs work

I've tested this and it looks like a nice idea - being able to break your own locks makes sense to me

I'm going to add a test for this.

alexpott’s picture

Status: Needs work » Reviewed & tested by the community

Added a test that proves the patch is necessary and works like a charm. Thanks @jviitamaki

alexpott’s picture

Version: 8.x-2.x-dev » 3.x-dev

  • alexpott committed acee229b on 3.x
    fix: #3559775 Break lock operation not showing for user who created the...
alexpott’s picture

Status: Reviewed & tested by the community » 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.

Status: Fixed » Closed (fixed)

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