aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_versions/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Check permissions when labeling a versionLouis Chemineau2024-02-211-0/+4
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* Check node permissions when restoring a versionLouis Chemineau2024-02-211-0/+4
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* Check node permissions when deleting a versionLouis Chemineau2024-02-211-1/+29
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* feat: rename users to account or personVincent Petry2024-02-131-2/+2
| | | | | | Replace translated text in most locations Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Revert "Reapply "Cleanup versions entity in during versions:clean command""Louis Chemineau2024-02-082-20/+0
| | | | This reverts commit ba3fdb0cdcfbb84f0080a2146a4ba2f01569915d.
* Reapply "Cleanup versions entity in during versions:clean command"Louis Chemineau2024-02-072-0/+20
| | | | This reverts commit 17ee5968263a5bb96f4ca1d50845ad06066f8062.
* Revert "Cleanup versions entity in during versions:clean command"Louis Chemineau2024-02-012-20/+0
| | | | This reverts commit 1ec9f3e5f9dd84723008137af73cf365beaf4d1b.
* Cleanup versions entity in during versions:clean commandLouis Chemineau2024-02-012-0/+20
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* chore: Fix missing template parameter for IEventListenerCôme Chilliet2024-01-303-0/+3
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* handle storage not available when expiring versionsRobin Appelman2024-01-241-0/+5
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Improve path resolution in files_version hooksLouis Chemineau2024-01-171-2/+10
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* fix: Properly fetch version from shared files by accessing the owner storage ↵Julius Härtl2023-12-061-0/+16
| | | | | | version Signed-off-by: Julius Härtl <jus@bitgrid.net>
* fix(files_versions): Explicitly check for user or owner before call ↵Git'Fellow2023-11-271-20/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-238-20/+15
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* Don't call getUid() on nullGit'Fellow2023-11-161-2/+6
| | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
* fix: Delete ghost versions of non-existing filesGit'Fellow2023-10-281-1/+4
| | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
* Merge pull request #39695 from fsamapoor/refactor_files_version_app_commandsCôme Chilliet2023-09-213-102/+64
|\ | | | | Refactors files version app commands.
| * Apply suggestions from code reviewFaraz Samapoor2023-09-212-2/+1
| | | | | | | | Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com> Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
| * Uses early returns.Faraz Samapoor2023-08-032-37/+40
| | | | | | | | | | | | To improve code readability. Signed-off-by: Faraz Samapoor <fsa@adlas.at>
| * Refactors files_version app commands.Faraz Samapoor2023-08-033-64/+24
| | | | | | | | | | | | To improve code readability. Signed-off-by: Faraz Samapoor <fsa@adlas.at>
* | Move module versions management logic out of main logicLouis Chemineau2023-09-075-29/+122
| | | | | | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* | fix: Also cleanup version metadata if expiringJulius Härtl2023-08-141-0/+15
|/ | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* files_versions: Add OpenAPI specjld31032023-07-132-5/+13
| | | | Signed-off-by: jld3103 <jld3103yt@gmail.com>
* Enable all files versions features when groupfolders is enabledLouis Chemineau2023-07-051-4/+2
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* feat(ocp): More specific type for ICapabilities::getCapabilitiesChristoph Wurst2023-07-031-2/+0
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Base versions' has-preview on mimetypeLouis Chemineau2023-06-292-26/+3
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* Provide hasPreview in files_versions DAV APILouis Chemineau2023-06-282-2/+29
| | | | | | | 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>
* Do not create a new version if previousNode has the same mtimeLouis Chemineau2023-06-221-2/+2
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* fix: Add logging statement for cases when updating the version failsJulius Härtl2023-06-211-8/+29
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Handle previousNode size === 0 on version creationLouis Chemineau2023-06-211-20/+10
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* fix: Avoid failing to update the current version entry if there is noneJulius Härtl2023-06-131-5/+12
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Enable version features again with S3 versioningBenjamin Somers2023-06-131-3/+3
| | | | Signed-off-by: Benjamin Somers <bsomers@resel.fr>
* Fix initialisation of versions in the DBLouis Chemineau2023-05-252-4/+31
| | | | | | Broken after https://github.com/nextcloud/server/pull/36690 Signed-off-by: Louis Chemineau <louis@chmn.me>
* Check if version has entity before trying to access itGit'Fellow2023-05-121-1/+1
| | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
* Check if version entity is not null before deleteGit'Fellow2023-05-081-1/+6
| | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
* fix: catch ManuallyLockedException and use app contextMax2023-05-032-16/+67
| | | | | | | | | | | | 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>
* Merge pull request #37428 from nextcloud/enh/ignore-non-numeric-versionsCôme Chilliet2023-04-201-1/+7
|\ | | | | Ignore and log non integer versions
| * Check for non-numeric versions, not non-integerCôme Chilliet2023-04-051-2/+2
| | | | | | | | | | | | All versions are string Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * Ignore and log non integer versionsCôme Chilliet2023-04-051-0/+6
| | | | | | | | | | | | | | | | 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>
* | Really disable versions features when S3 versioning is enabledLouis Chemineau2023-04-171-1/+1
| | | | | | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* | Merge pull request #36690 from nextcloud/bugfix/noid/rollback-hookJulius Härtl2023-04-143-20/+27
|\ \ | |/ |/|
| * fix: Check return type on rollbackJulius Härtl2023-03-131-5/+8
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
| * don't re-get fileinfo for versioned file if it's not sharedRobin Appelman2023-03-131-13/+17
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * tests(files_versions): Tear down fs to clear mount cache before testingJulius Härtl2023-03-131-1/+1
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
| * fix: Make sure that rollback hook is triggered on all version backendsJulius Härtl2023-03-132-7/+7
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | Fix return type of methods returning false on errorCôme Chilliet2023-04-031-1/+1
|/ | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Handle empty DB while expiring versionsLouis Chemineau2023-02-081-4/+10
| | | | | | | | 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>
* Document that size may be a float in new class VersionEntityCôme Chilliet2023-02-074-9/+13
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix versions restoring with S3Louis Chemineau2023-01-261-5/+24
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* Use node's owner if no user is connectedLouis Chemineau2023-01-261-15/+25
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>