Add function which will fail if a resource / collection is locked and will return the appropriate error.
Add function which will fail if a resource / collection is locked and will
return the appropriate error.

lkraav/davical-rss-feature-branch,lkraav/davical-rss-feature-branch,lkraav/davical-rss-feature-branch,lkraav/davical-rss-feature-branch