Commit graph

423 commits

Author SHA1 Message Date
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
Eduardo Morales
88b40bb392 feat: added metadata event listener
Signed-off-by: Eduardo Morales <emoral435@gmail.com>
2024-03-11 15:57:12 -05:00
Louis
310c8be748
Revert "files_versions: add missing null check" 2024-03-08 10:33:30 +00:00
Varun Patil
d49787d004 fix(files_versions): Add missing null check
Signed-off-by: Varun Patil <varunpatil@ucla.edu>
2024-03-07 11:21:57 -08:00
Louis Chemineau
fcdc8b47f2 fix(files_versions): Improve files version listing
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-03-06 10:15:31 +01: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
John Molakvoæ
a58ed05f1d
Merge pull request #43898 from nextcloud/artonge/fix/improve_files_versions_listing
Improve files version listing
2024-03-04 17:23:18 +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
66fbb7be76 fix(files_versions): Do not create a new version for empty files
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-02-29 21:32:28 +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
Vincent Petry
839ddaa354
feat: rename users to account or person
Replace translated text in most locations

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2024-02-13 21:06:30 +01:00
Louis Chemineau
5ae0f5b32f
Revert "Reapply "Cleanup versions entity in during versions:clean command""
This reverts commit ba3fdb0cdc.
2024-02-08 18:47:07 +01:00
Louis Chemineau
ba3fdb0cdc
Reapply "Cleanup versions entity in during versions:clean command"
This reverts commit 17ee596826.
2024-02-07 16:11:33 +01:00
Louis Chemineau
17ee596826
Revert "Cleanup versions entity in during versions:clean command"
This reverts commit 1ec9f3e5f9.
2024-02-01 23:37:26 +01:00
Louis Chemineau
1ec9f3e5f9
Cleanup versions entity in during versions:clean command
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-02-01 16:44:57 +01:00
Côme Chilliet
8bcc2d352e chore: Fix missing template parameter for IEventListener
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-01-30 10:57:15 +01:00
Robin Appelman
6fbf22ef5e
handle storage not available when expiring versions
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-01-24 10:49:38 +01:00
Louis Chemineau
51fa2e3b19
Improve path resolution in files_version hooks
Signed-off-by: Louis Chemineau <louis@chmn.me>
2024-01-17 17:17:51 +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
Git'Fellow
4173dfe05b fix(files_versions): Explicitly check for user or owner before call getUserFolder
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>

Fix typo

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>

Fix

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>

Fix

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>

Fix

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>

Optimize DI

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>

Switch to DI

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>

userSession does not contain null

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>

Restore phpdoc annots

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2023-11-27 15:17:13 +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
Git'Fellow
652317e3e2
Don't call getUid() on null
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2023-11-16 01:28:42 +01:00
Git'Fellow
ffeef99abc
fix: Delete ghost versions of non-existing files
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2023-10-28 14:47:19 +02:00
Côme Chilliet
39d4c8759b
Merge pull request #39695 from fsamapoor/refactor_files_version_app_commands
Refactors files version app commands.
2023-09-21 15:23:36 +02:00
Faraz Samapoor
0273b96eef
Apply suggestions from code review
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
2023-09-21 11:40:18 +03:30
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
Julius Härtl
bbb7172220
fix: Also cleanup version metadata if expiring
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-08-14 19:31:41 +02:00
Faraz Samapoor
90652fd30f Uses early returns.
To improve code readability.

Signed-off-by: Faraz Samapoor <fsa@adlas.at>
2023-08-03 16:42:56 +03:30
Faraz Samapoor
ab79706253 Refactors files_version app commands.
To improve code readability.

Signed-off-by: Faraz Samapoor <fsa@adlas.at>
2023-08-03 16:35:09 +03:30
jld3103
3dff41786d files_versions: Add OpenAPI spec
Signed-off-by: jld3103 <jld3103yt@gmail.com>
2023-07-13 10:20:09 +02:00
Louis Chemineau
eb71ee950d Enable all files versions features when groupfolders is enabled
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-07-05 15:52:13 +02:00
Christoph Wurst
95145ee0c9
feat(ocp): More specific type for ICapabilities::getCapabilities
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-07-03 10:03:45 +02:00
Louis Chemineau
05acd916b5 Base versions' has-preview on mimetype
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-06-29 12:08:59 +02:00
Louis Chemineau
36c3846475 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-06-28 16:46:48 +02:00
Louis Chemineau
7fec07196d Do not create a new version if previousNode has the same mtime
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-06-22 17:49:49 +02:00
Julius Härtl
b94145f6bd
fix: Add logging statement for cases when updating the version fails
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-06-21 10:35:12 +02:00
Louis Chemineau
ecdcc72e4d Handle previousNode size === 0 on version creation
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-06-21 09:56:20 +02:00
Julius Härtl
e76c96be5c
fix: Avoid failing to update the current version entry if there is none
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-06-13 22:10:13 +02:00
Benjamin Somers
75e04614c1 Enable version features again with S3 versioning
Signed-off-by: Benjamin Somers <bsomers@resel.fr>
2023-06-13 15:06:36 +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
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