Unlock button is always displayed to node owner

Created on 15 September 2024, 7 months ago

Problem/Motivation

As a user without the "break content lock", I always see the "Unlock" button while editing my own content.

Steps to reproduce

As an authenticated user, create a content. As the same user edit the content. The "Unlock" link is there.

Proposed resolution

Add permission checking to ContentLockController::createLockCall().

Remaining tasks

Add the permission check.

User interface changes

None

API changes

None

Data model changes

None

πŸ› Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

πŸ‡¬πŸ‡·Greece vensires

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

Merge Requests

Comments & Activities

  • Issue created by @vensires
  • Merge request !54Fix issue #3474544 β†’ (Open) created by vensires
  • πŸ‡¬πŸ‡·Greece vensires

    Add patch from MR.

  • Status changed to Needs review 7 months ago
  • Pipeline finished with Failed
    7 months ago
    Total: 274s
    #283830
  • πŸ‡΅πŸ‡±Poland besek

    But isn't it reasonable that you have option to unlock the content you are editing? It's almost like a "cancel edit button". The problem wold be if you want to break someone elses lock. And than permission would be needed.
    But I don't think this change is needed as you should be able to unlock the content you just locked.

  • πŸ‡¬πŸ‡·Greece vensires

    In an environment where you have someone proposing content and other users managing this content, it’s common need that you don’t want these first users to confuse them with an unlock button. This might not be a permission but an alter hook. Whatever suits you best.

Production build 0.71.5 2024