Robin Appelman
86858b75c9
fix: fallback from guessing the owner from path in versioning
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-03-16 12:24:30 +00:00
Louis Chemineau
57a1fb8674
fix(files_versions): Improve files version listing
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-03-07 12:56:38 +01:00
Louis Chemineau
2957d8ad9b
fix(files_versions): Improve files version listing
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-03-04 16:32:06 +00:00
Louis Chemineau
da86eaf0bc
fix(files_versions): Do not create a new version for empty files
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-03-01 09:18:43 +00:00
Louis Chemineau
1c4cfa1ee0
Check permissions when labeling a version
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-02-21 21:47:50 +01:00
Louis Chemineau
d8026de6b3
Check node permissions when restoring a version
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-02-21 21:47:50 +01:00
Louis Chemineau
b48b153ac6
Check node permissions when deleting a version
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-02-21 21:47:50 +01:00
Robin Appelman
6d91e581f7
handle storage not available when expiring versions
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-01-25 16:28:12 +00:00
Louis Chemineau
91c8e790ba
Improve path resolution in files_version hooks
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-01-18 10:38:07 +00:00
Julius Härtl
f401b582d3
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 20:43:24 +00:00
Git'Fellow
de7e4e1612
fix: Delete ghost versions of non-existing files
...
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2023-12-04 20:52:57 +01:00
Git'Fellow
61d7328cae
Check for owner before call getUserFolder
...
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2023-11-28 10:14:12 +01:00
Arthur Schiwon
5103669ff8
Revert "[stable27] fix(files_versions): don't call getUid() on null"
2023-11-20 10:52:00 +01:00
Git'Fellow
07c0223863
Don't call getUid() on null
...
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2023-11-16 17:27:06 +00:00
Louis Chemineau
4d93b8f9bc
Move module versions management logic out of main logic
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-09-07 22:35:04 +02:00
Julius Härtl
6c05eb95ee
fix: Also cleanup version metadata if expiring
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-08-16 15:44:06 +02:00
Louis Chemineau
e7d5432782
Enable all files versions features when groupfolders is enabled
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-07-10 11:51:14 +02:00
Benjamin Somers
f287866982
Enable version features again with S3 versioning
...
Signed-off-by: Benjamin Somers <bsomers@resel.fr>
2023-07-06 19:29:17 +02:00
Louis Chemineau
859552b887
Base versions' has-preview on mimetype
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-07-03 11:11:47 +02:00
Louis Chemineau
b164af46c7
Provide hasPreview in files_versions DAV API
...
This allow to no request non existing previews
I also set some properties to the img element to reduce preview loading to what the browser think is necessary
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-07-03 11:04:57 +02:00
Louis Chemineau
af0f1149ed
Do not create a new version if previousNode has the same mtime
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-06-26 17:57:38 +02:00
Julius Härtl
9d348950c0
fix: Add logging statement for cases when updating the version fails
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-06-26 17:57:38 +02:00
Louis Chemineau
e8a2847bad
Handle previousNode size === 0 on version creation
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-06-26 17:57:38 +02:00
Julius Härtl
ea30d1165b
fix: Avoid failing to update the current version entry if there is none
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-06-26 17:57:38 +02:00
Louis Chemineau
e54bfc00bd
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-30 16:41:03 +02:00
Git'Fellow
d6eb48c436
Check if version has entity before trying to access it
...
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2023-05-12 16:00:16 +02:00
Git'Fellow
7cd5cbe6e9
Check if version entity is not null before delete
...
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2023-05-08 14:24:58 +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
Côme Chilliet
60b7d2117e
Merge pull request #37428 from nextcloud/enh/ignore-non-numeric-versions
...
Ignore and log non integer versions
2023-04-20 13:33:58 +02:00
Louis Chemineau
cca46f18eb
Really disable versions features when S3 versioning is enabled
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-04-17 11:16:20 +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
a6b1d990a4
Check for non-numeric versions, not non-integer
...
All versions are string
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-05 17:50:45 +02:00
Côme Chilliet
8cc8765089
Ignore and log non integer versions
...
This avoids being stuck when there is one buggy file version with a
non-integer version. It allows the expiration process to not crash and
continue with the other ones.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-05 17:44:14 +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
Louis Chemineau
21cd3b0e0d
Handle empty DB while expiring versions
...
Version on the FS can have no equivalent in the DB if they were created before the version naming feature. This makes sure that we catch the resulting exception and proceed as usual.
Fix https://github.com/nextcloud/server/issues/36541
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-02-08 13:56:49 +00: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
88abb2d97c
Fix versions restoring with S3
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-01-26 10:12:23 +00:00
Louis Chemineau
3da63f4148
Use node's owner if no user is connected
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-01-26 10:12:23 +00:00
Louis Chemineau
84e5b9c5f7
Prevent storing versions with the same mtime
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-01-26 10:12:23 +00:00
Louis Chemineau
6dcfb29cfc
Fix renaming files_versions
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-01-26 10:12:23 +00: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
d8b479752d
Fix hookconnector tests
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-01-26 10:12:23 +00:00
Louis Chemineau
53d736207c
Adapt files_versions tests to modernized hooks
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-01-26 10:12:23 +00:00
Louis Chemineau
2ce4ac4aa4
User rootFolder instead of userFolder in FileEventsListener
...
Requesting userFolder fails during NC installation phase.
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-01-26 10:12:23 +00:00
Louis Chemineau
8f23cc8259
Rename Hooks.php to FileEventsListener.php
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-01-26 10:12:23 +00:00
Louis Chemineau
ad469969bf
Prevent expiration of named versions
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-01-26 10:12:23 +00:00