Closed laulaz closed 10 months ago
Yes, locking behavior bites us also every now and then. It's very subtle but in the toolbar you see the "lock" icon before the modification date which indicates that the object is locked. I thought it's colored differently in that case though. Additionally we could "disable" the action links when the object is locked.
@petschki OK, now I see the lock icon 😄 ... but anyway, if the object is locked by you, you don't get any clear warning (but a traceback when cutting / deleting) nor any way to unlock the object. When you edit the content, the lock is "transparent" (you don't realize it was locked by you), I think it should be the same when you cut / delete the object.
Disabling the action links when the object is locked would be another good option if and only if the user has a clear way to unlock the object (for now, he has to know that it is locked and that in that case he must edit -> cancel ... there is no "unclock" button for him).
BUG
What I did:
What I expect to happen:
I should be able to delete the object.
What actually happened:
The object is locked (which is normal), but I don't have any warning since it is locked by me (and not by another user). I should be able to delete the object, even if it is locked for other users. But it fails.
Some work has been done since https://github.com/plone/Products.CMFPlone/issues/1876 in
plone.app.content
, but it is not handling use cases where the lock is created by the current user. The only place where you can get any information about this lock is through thefolder_contents
cut / delete actions (ex: in https://github.com/plone/plone.app.content/pull/70), even if the user has maybe no clue of how to unlock the content (no button, no action --> he needs to edit it again) :We should IMHO automatically unlock the object when the lock is created by the current user (for cutting / deleting).
The traceback the user gets when deleting is:
What version of Plone/ Addons I am using:
Plone 6.0.6
Live demo:
https://github.com/plone/Products.CMFPlone/assets/1101273/e20675c7-9929-454e-9007-79fa6ac3997a