Closed (fixed)
Project:
Content locking (anti-concurrent editing)
Version:
3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Apr 2018 at 18:39 UTC
Updated:
14 Oct 2024 at 15:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
schlaukopf commentedComment #3
schlaukopf commentedThis is not a solution, this is a temporal fix, it will break the locks from the associated content of the user that is being deleted, but it affects the default behavior of the module that prevents content to be deleted when it has active locks.
Comment #4
fabiansierra5191 commentedAccording to the previous "temporal fix" I think that is not the final code solution but if a user wants to delete a content that is locked and the user has the permission, it should be. Imagine that you want to delete and the user with its content and that user has 10 nodes (5 locked) and the admin wants to delete all of them, until now the admin have to unblock all of them one by one but with the following proposed patch that is basically as the comment above but validating permission, if the user wants to delete the blocked content and has the permission to unlock content, they can.
I attached two files one for the alpha version that has a small change in the
drupal_set_messagefunction with the word "alpha" in the file name and the other one for the latest version.Comment #5
azussman commentedBased on the previous patch, I have adjusted it to work with the latest version 8.x-2.x
Comment #8
anairamzapSetting to needs review.
Comment #9
anairamzapSorry for the multiple edits, but forgot to update the base branch version to latest dev :S
Comment #10
astonvictor commentedComment #16
astonvictor commentedI think it's ok to allow users to remove content with the
break content lockpermission because it's the same as doing it via the 'Unlock' action.FYI
EntityBreakLockForm::access()method has the check by the permission.I guess It won't fix a case when a user has access to cancel another user and its content but doesn't have permission to break the lock.
It should be handled in another way. e.g. check if the user tries to remove it via UI or in the background.
for example, all
::load()methods don't have validations if the user can load entities.Comment #17
astonvictor commented