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
Louis Chemineau
1adc9d2aab
Delete file versions entries in DB when node is deleted
...
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
Louis Chemineau
e82bfba114
Create files_versions table
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-01-26 10:12:22 +00:00
Louis Chemineau
1ade482797
Modernise hook listener of files_versions
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2023-01-26 10:12:22 +00:00
Côme Chilliet
53cb5b8d07
Handle badly named version files more gracefully and log information
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-10-11 10:10:49 +02:00
Robin Appelman
9587a4a548
use filesystem user instead of file owner for creating version
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-09-09 16:22:40 +02:00
Robin Appelman
7be5788995
always use the default fs owner when storing versions
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-09-06 16:59:48 +02:00
Carl Schwan
48d9c4d2b0
Port existing server code to new interface
...
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-08-08 17:03:19 +02:00
Thomas Citharel
190a71ecf9
Expose additional emails in {DAV:}alternate-URI-set
...
This allows iMip invitations to be send with an alternative email as
"Reply-To" field.
Closes #27201
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-05-17 15:11:36 +02:00
Robin Appelman
d5953e5c33
cache internalpath in versions cleanup
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-04 15:40:34 +02:00
Daniel Kesselberg
3293428ac0
Add configuration flag to disable the background job for files_versions
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2021-10-11 12:32:46 +02:00
Vincent Petry
62947867ce
Merge pull request #27408 from PhrozenByte/enhancement/FilesVersionsCleanUpPath
...
Add occ versions:cleanup --path option
2021-10-08 08:01:55 +02:00
Daniel Rudolf
54cb4ac840
Improve occ versions:cleanup --path option
...
Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
2021-10-07 19:18:03 +02:00
Richard Steinmetz
57ad9e4b0f
Merge pull request #28458 from nextcloud/expose-user-language-dav
...
Expose user language through DAV
2021-08-20 11:31:27 +02:00
Robin Appelman
5f101d910b
use search to find versions to expire
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-08-18 16:52:22 +02:00
Thomas Citharel
a7b9b398a3
Expose user language through DAV
...
Introduces the '{http://nextcloud.com/ns }language' prop that gives the
user's language
Closes #28449
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-08-16 19:03:00 +02:00
szaimen
98102bfa78
Improve auto expiration hint
...
Signed-off-by: szaimen <szaimen@e.mail.de>
Co-Authored-By: Pytal <24800714+Pytal@users.noreply.github.com>
2021-08-08 20:41:38 +02:00
Carl Schwan
701b57b81d
Remove allmost all deprecation from the files_version app
...
The remaining deprecations are related to Utils::hooks and I will take a
look at how EventDispatcher works before working on them.
Aside from the deprecations, this patch also does a few minor
improvements around type hinting.
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2021-07-23 10:07:38 +02:00
Daniel Rudolf
c8870d0756
Add occ versions:cleanup --path option
...
Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
2021-06-07 00:32:27 +02: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
8196420063
Drop \OCP\User
...
Inlines and remaining usages and drops the deprecated public API.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-05-21 15:00:34 +02:00
Joas Schilling
236aa194e2
Restrict autocompletion also based on the phonebook known users
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-03-10 17:19:55 +01:00
dependabot-preview[bot]
eb502c02ff
Bump nextcloud/coding-standard from 0.3.0 to 0.5.0
...
Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard ) from 0.3.0 to 0.5.0.
- [Release notes](https://github.com/nextcloud/coding-standard/releases )
- [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md )
- [Commits](https://github.com/nextcloud/coding-standard/compare/v0.3.0...v0.5.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-02-18 13:31:24 +01:00
Robin Appelman
b2fb4d898a
dont stop expiring versions if we cant check if the source file still exists
...
instead continue assuming it still exists
Signed-off-by: Robin Appelman <robin@icewind.nl>
2021-02-05 15:06:43 +01:00
Christoph Wurst
d89a75be0b
Update all license headers for Nextcloud 21
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 18:48:22 +01:00
Christoph Wurst
12d1c27b7f
Catch storage not available in versions expire command
...
External storage with session credentials is not accessible without a
user session, hence background jobs and CLI commands can't work with
them. The previously unhandled exception causes logged errors in the
nextcloud log. This patch catches the specific exception and logs it as
warnings. So for a production instance the error won't spam their logs
for this non-recoverable and technically unsolvable error if the minimum
log level is set to the default of 3 (error).
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-11-25 09:28:38 +01:00
Morris Jobke
6ce05bc7d7
Return all keys in getAllVersions() instead
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-10-12 22:17:06 +02:00
Christoph Wurst
02fa3253fe
Fix undefined index and consequential damages in versions code
...
If the user has no space and there are no versions, there won't be an
`all` index in the versions entry. Hence this triggers a warning and
becomes `null`, afterwards `count`, `foreach` and friends will happily
throw even more warnings and errors because they don't want to play with
`null`. Thus adding a fallback to an empty array.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-12 22:17:06 +02:00
Christoph Wurst
d9015a8c94
Format code to a single space around binary operators
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-05 20:25:24 +02:00
Christoph Wurst
2a054e6c04
Update the license headers for Nextcloud 20
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-08-24 14:54:25 +02:00
Christoph Wurst
3b0478773a
Migrate files versions to the PSR container
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-16 15:53:40 +02:00
Morris Jobke
29ffaa5676
Move files_versions to bootstrap mechanism
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-09 14:13:18 +02:00
Joas Schilling
3e0cfa6c32
Add missing return
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-26 15:25:33 +02:00
Joas Schilling
d7c0b9cced
Also always return in app commands
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-26 15:12:11 +02:00
Christoph Wurst
cb057829f7
Update license headers for 19
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-29 11:57:22 +02:00
Liam JACK
b6c76f43a1
Fix #19066 - Array offset error due to empty file versions array
...
Signed-off-by: Liam JACK <liamjack@users.noreply.github.com>
2020-04-12 15:35:17 +02:00
Christoph Wurst
28f8eb5dba
Add visibility to all constants
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:54:27 +02:00