plone.restapi icon indicating copy to clipboard operation
plone.restapi copied to clipboard

Refactor @lock endpoint based on CRUD operations and add it to expandable @components

Open avoinea opened this issue 4 years ago • 6 comments

Verb URL Action
POST /@lock Lock an object
GET /@lock Current lock information
PATCH /@lock Refresh lock
DELETE /@lock Remove lock

We should also be able to use expand=lock in order to easily get locking information in one Rest API call.

@tisto @sneridagh @tiberiuichim thoughts?!

avoinea avatar Jul 22 '21 10:07 avoinea

+1 looks good, seems semantic.

tiberiuichim avatar Jul 22 '21 11:07 tiberiuichim

@avoinea this makes sense to me. Though, we have to be aware that this is a breaking change and requires a new major release. I saw that you kept the old code to be backward compatible. This might be a way to go to avoid a major release.

Though, the question is if this effort does make sense. I could imagine that not lots of people are using this anyways. Maybe it is cleaner to make a breaking release and get rid of the old code altogether. Just thinking out loud here...

tisto avatar Jul 23 '21 03:07 tisto

@tisto As we will need to cherry-pick it in 7.x I think is best to do it in 2 steps, first deprecate, then drop it and major release :wink:

avoinea avatar Jul 23 '21 07:07 avoinea

@avoinea right. We won't be able to drop the functionality in the 7.x branch (at all).

tisto avatar Jul 23 '21 14:07 tisto

@avoinea could you image to work on a PR for master that removes the old lock endpoint behavior for plone.restapi 9? I'd like to have a set of PRs ready once we are ready to move on to version 9 (with Plone 6).

tisto avatar Sep 25 '21 05:09 tisto

@tisto I think that's an easy one. :beer:

avoinea avatar Sep 25 '21 11:09 avoinea