Commit graph

40 commits

Author SHA1 Message Date
Louis Chemineau
369274c9ee
feat(files_versions): Add listener and interfaces to allow versions migration across storages
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-03-26 17:40:31 +01:00
Louis Chemineau
a15c0d6515
Merge pull request #44297 from nextcloud/fix/forbid-tagging-readonly-files
Forbid tagging readonly files

Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-03-21 15:10:30 +01:00
Louis Chemineau
9361a305ba
chore(files_versions): Use new metadata API for versions
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-03-13 15:27:06 +01:00
Eduardo Morales
c5d1fda4ab fix: fixed stylistic errors
Signed-off-by: Eduardo Morales <emoral435@gmail.com>
2024-03-11 15:57:12 -05:00
Eduardo Morales
a8844d408b fix(files_version): deprecated INameableVersion
Signed-off-by: Eduardo Morales <emoral435@gmail.com>
2024-03-11 15:57:12 -05:00
Eduardo Morales
4cf4fdc278 feat: exposed metadata column to frontend
Signed-off-by: Eduardo Morales <emoral435@gmail.com>
2024-03-11 15:57:12 -05:00
Eduardo Morales
b2c855451c feat: added backend metadata interface, allows JSON storage
Signed-off-by: Eduardo Morales <emoral435@gmail.com>
2024-03-11 15:57:12 -05:00
Robin Appelman
fd4ca13867
Merge pull request #43471 from nextcloud/cache-path-by-id
Cache path by id
2024-03-05 17:26:25 +01:00
Robin Appelman
e7a7b4a401 perf: switch places that always use the first getById result to getFirstNodeById
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-03-04 13:57:31 +01:00
Louis Chemineau
870572783a fix(files_versions): Improve files version listing
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-02-29 21:32:20 +01:00
Louis Chemineau
046b8f320f
Check permissions when labeling a version
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-02-21 15:09:33 +01:00
Louis Chemineau
37d0fd109a
Check node permissions when restoring a version
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-02-21 15:06:01 +01:00
Louis Chemineau
741dec283f
Check node permissions when deleting a version
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-02-21 15:06:01 +01:00
Julius Härtl
75505747bb fix: Properly fetch version from shared files by accessing the owner storage version
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-12-06 16:01:53 +01:00
Joas Schilling
aa5f037af7
chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-11-23 10:36:13 +01:00
Louis Chemineau
cec0b310a5 Move module versions management logic out of main logic
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-09-07 15:47:59 +02:00
Louis Chemineau
c3475f4dbb Fix initialisation of versions in the DB
Broken after https://github.com/nextcloud/server/pull/36690

Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-05-25 23:43:40 +02:00
Max
337fc110ec
fix: catch ManuallyLockedException and use app context
The files_lock app may throw ManuallyLockedExceptions
when attempting to revert a file that is currently opened.
This would prevent the user from rolling back a opened file.

Text and Richdocuments handle changes of the file while editing.
Allow reverting files even when they are locked by these apps
and let the apps handle the conflict.

Signed-off-by: Max <max@nextcloud.com>
2023-05-03 09:52:36 +02:00
Julius Härtl
2e1a560867
Merge pull request #36690 from nextcloud/bugfix/noid/rollback-hook 2023-04-14 17:09:17 +02:00
Côme Chilliet
ea05544213
Fix return type of methods returning false on error
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-03 10:52:34 +02:00
Julius Härtl
f00f4244d4
fix: Check return type on rollback
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-03-13 10:59:33 +01:00
Robin Appelman
62e6a32899
don't re-get fileinfo for versioned file if it's not shared
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-03-13 10:52:37 +01:00
Julius Härtl
c22d51c1ad
tests(files_versions): Tear down fs to clear mount cache before testing
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-03-13 10:52:37 +01:00
Julius Härtl
cf46bd6915
fix: Make sure that rollback hook is triggered on all version backends
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-03-13 10:52:35 +01:00
Côme Chilliet
1765908c03
Document that size may be a float in new class VersionEntity
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-07 11:23:34 +01:00
Louis Chemineau
c88328e68e Handle empty files in version creation logic
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-01-26 10:12:23 +00:00
Louis Chemineau
6a2f8bc599 Allow to delete a version through DAV
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-01-26 10:12:23 +00:00
Louis Chemineau
629de6c8c9 Support getting and patching version-label
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-01-26 10:12:23 +00:00
John Molakvoæ (skjnldsv)
215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +02:00
Christoph Wurst
caff1023ea
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.

This also removes and empty lines from method/function bodies at the
beginning and end.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 14:19:56 +02:00
Christoph Wurst
1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-31 14:52:54 +02:00
Christoph Wurst
74936c49ea
Remove unused imports
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-25 22:08:08 +01:00
Christoph Wurst
df9e2b828a
Fix mismatching docblock return types
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-06 16:38:25 +01:00
Roeland Jago Douma
061b9bb0e7
Merge pull request #18231 from nextcloud/fix/shared_version_restore
Fix restoring shared versions
2019-12-09 21:17:24 +01:00
Roeland Jago Douma
78050ec531
Fix restoring shared versions
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-12-05 16:50:45 +01:00
Christoph Wurst
5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +01:00
Robin Appelman
a0a3f534f7
allow non integer version ids
currently version ids are timestamps, but for storage provided versions
this is not always the case and they might be strings

Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-06-04 14:15:20 +02:00
Robin Appelman
ccfbee2af9
add way for version backends to programmatically specify if they should be used
this allows for backends that should only be used if specific conditions are met

Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-05-21 17:14:47 +02:00
Roeland Jago Douma
6415532508
Allow shared versions again in legacy backend
To make sure that the versions in the legacy backend are shared again we
have to check the storage of a file. Since all shared files are still on
the owners storage.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-01-25 21:10:46 +01:00
Robin Appelman
4403d771ad
modular versions api
Allows apps to register version backends for storage types
The existing versions backend is wrapped in a "legacy" backend.

Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-11-01 00:21:48 +01:00