stable

Clone or download

Read-only

POST and DELETE docman_embedded/id/lock route

part of story #12454 Lock documents How to test: - call the POST/DELETE route on an item who is not a file => error - call the POST/DELETE route on an item locked by an other user => error - call the POST/DELETE route on a item you can read => error - call the POST route on an item you can update => success, item is now locked by yourself - call the DELETE route on an item locked by yourself => success, item is no more locked You should be able to lock/unlock embedded items directly in vue app Change-Id: Ic61d0155321f4032879106ec72358cc431d6bf5d

Modified Files

Name
M plugins/docman/include/REST/v1/DocmanEmbeddedFilesResource.php +111 −15 Go to diff View file
M plugins/docman/include/REST/v1/DocmanEmptyDocumentsResource.php +13 −2 Go to diff View file
M plugins/docman/include/REST/v1/DocmanFilesResource.php +54 −74 Go to diff View file
M plugins/docman/include/REST/v1/DocmanFoldersResource.php +13 −10 Go to diff View file
M plugins/docman/include/REST/v1/DocmanLinksResource.php +21 −19 Go to diff View file
M plugins/docman/include/REST/v1/DocmanWikiResource.php +22 −14 Go to diff View file
M plugins/docman/include/REST/v1/DocumentBeforeModificationValidatorVisitor.php +41 −2 Go to diff View file
A plugins/docman/include/REST/v1/Lock/RestLockUpdater.php +82 −0 Go to diff View file
M plugins/docman/phpunit/REST/v1/DocumentBeforeModificationValidatorVisitorTest.php +34 −1 Go to diff View file
A plugins/docman/phpunit/REST/v1/Lock/RestLockUpdaterTest.php +97 −0 Go to diff View file
M plugins/docman/tests/rest/Docman/DocmanItemsTestFilesEmbeddedTest.php +71 −0 Go to diff View file
M plugins/docman/tests/rest/DocmanDataBuilder.php +19 −4 Go to diff View file
M plugins/document/scripts/document/api/rest-querier.js +19 −1 Go to diff View file
M plugins/document/scripts/document/components/Folder/ActionsDropDown/DropdownMenu.vue +2 −2 Go to diff View file
M plugins/document/scripts/document/components/Folder/ActionsDropDown/LockItem.spec.js +0 −17 Go to diff View file
M plugins/document/scripts/document/components/Folder/ActionsDropDown/LockItem.vue +1 −7 Go to diff View file
M plugins/document/scripts/document/components/Folder/ActionsDropDown/UnlockItem.spec.js +0 −17 Go to diff View file
M plugins/document/scripts/document/components/Folder/ActionsDropDown/UnlockItem.vue +1 −6 Go to diff View file
M plugins/document/scripts/document/store/actions.js +26 −5 Go to diff View file
M plugins/document/scripts/document/store/actions.spec.js +70 −10 Go to diff View file