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.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | content_lock_own.patch | 655 bytes | chrisjlock |
| #2 | break-lock-operation-permission-3559775-1.patch | 631 bytes | jviitamaki |
Issue fork content_lock-3559775
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
jviitamaki commentedComment #4
chrisjlock commentedPatch not needed for 3.0.0-alpha4; verified working as intended. Root cause was custom code.
Comment #5
alexpottI'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.
Comment #7
alexpottAdded a test that proves the patch is necessary and works like a charm. Thanks @jviitamaki
Comment #8
alexpottComment #10
alexpott