Add a way to unlock content while saving it
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 109
- Forks
- 107
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 4
Description
Currently when an item is saved in Volto, it makes 2 separate requests: one to update the content, and one to unlock it.
- User clicks save
- Volto sends a PATCH to the content URL and a POST to [content url]/@unlock
- When the PATCH is done, Volto navigates back to the content view, which does a GET of the content URL
If the unlock has not yet finished at step 3, some actions might not be available yet in the GET response, since the content is still locked.
To avoid this, we can add a way to unlock the content in the same transaction where it is updated. Maybe an X-Plone-Unlock header or something.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the save sequence described in the issue: the PATCH to the content URL, the POST to [content url]/@unlock, and the subsequent GET. Determine how the REST API could combine updating and unlocking so the following content view cannot observe a still-locked item. Done means the update and unlock are coordinated through a defined API mechanism and the race described no longer occurs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100