Problem/Motivation
If there are entities which are locked and you use the multiple delete capability of bulk actions then you will get exceptions and odd error messages. Ideally a user should be prompted to unlock the entities prior to deleting.
Note a recent change #2957931: An AJAX HTTP error occurred when a user and its content is being deleted that is probably too liberal. I think that change in pre-delete breaks the ideal flow of content lock - which is warning a user and getting them to unlock prior to taking an action.
Steps to reproduce
Use bulk actions to delete entities that are locked.
Proposed resolution
Add an access check to prevent deletion if the user does not have the ability to break the lock. This is much better than the current redirect solution.
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork content_lock-3525533
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 #3
alexpottComment #4
alexpottComment #5
chr.fritschI tested this in Thunder 7.4.x. I created an article and went to the edit page, so the article is locked. I went back to the content overview and wanted to delete the article.
Then I got the following error message:
Comment #6
alexpottFixed the error reported in #5 - I think this is a bug in 3.x but it is good to catch it and fix it here because it is caused by deleting entities with form op locking enabled.
Comment #7
chr.fritschThis looks really good to me. The flow makes much more sense now
Comment #9
alexpott