Add manual file locking to oC Web
Description
assumption: Locking-API is existent
User Stories
-
As a user I want to be sure that I can work exclusiveley on a file, so that my changes dont get overritten accidentally by others.
Value
- safety for users to not loose their work
- provide expected feature that is known from the Classic UI
Acceptance Criteria
- Context Menu: Add option "Lock file" / "Unlock file" to Context menu
- Sidebar Actions Add right sidebar Actions "Lock" (only if you have write permission)
- Locking is available on every file a user has write-access to (not available for folders at all)
- Manual unlocking can only be done by the user, who had locked the file.
- If file is locked, others can read the file, but not write
- If Not Locked and user has write-access: Show Button "Lock File"
- batch actions: add lock/unlock to batch actions
Definition of done
- Functional requirements [ ] functionality described in the user story works [ ] acceptance criteria are fulfilled
- Quality [ ] codrrrRe review happened [ ] CI is green [ ] critical code received unit tests by the developer [ ] automated tests passed (if automated tests are not available, this test needs to be created and passed
- Non-functional requirements [ ] no sonar cloud issues
Appendix
Manual File Locking behaviour in oc10: https://doc.owncloud.com/server/next/admin_manual/configuration/files/manual_file_locking.html
Should "Lock file" / "Unlock file" action also be shown in the Actions Panel in the right sidebar?
yep, added it to "Actions". Was there in my thoughts implicitly, added the AC now explicitly ;-) thx for notice!
@tbsbdr could you add conditionals for when and when not locking/unlocking is allowed? E.g. probably only with write permissions to the file.
updated ACs with locking/unlock conditionals.
Benedikt Kulmann commented: LOCK / UNLOCK are WebDaV methods on a resource to create / release locks