Git'Fellow
a1681b0756
chore(db): Apply query prepared statements
...
Fix: psalm
fix: bad file
fix: bug
chore: add batch
chore: add batch
chore: add batch
fix: psalm
2024-10-17 20:30:47 +07:00
provokateurin
9836e9b164
chore(deps): Update nextcloud/coding-standard to v1.3.1
...
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-19 14:21:20 +07:00
Daniel Kesselberg
af6de04e9e
style: update codestyle for coding-standard 1.2.3
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-08-25 19:34:58 +07:00
Robin Appelman
eb4fb994cf
fix: ensure array returned from getMountsForFileId is continious
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-08-02 17:22:33 +07:00
Robin Appelman
0931492ff0
fix: make usermountcache compatible with sharding
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-07-17 19:16:05 +07:00
Andy Scherzinger
dae7c159f7
chore: Add SPDX header
...
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-24 13:11:22 +07:00
Côme Chilliet
47b765552f
fix: Remove incorrect default null value
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-02 14:16:21 +07:00
Côme Chilliet
ec5133b739
fix: Apply new coding standard to all files
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-02 14:16:21 +07:00
Joas Schilling
951c330d39
Revert "don't perform an explicit setup when using the file cache"
2024-03-07 14:38:02 +07:00
John Molakvoæ
b7088e7071
Merge pull request #32163 from nextcloud/file-cache-gc-no-full-setup
...
don't perform an explicit setup when using the file cache
2024-03-07 11:09:19 +07:00
Robin Appelman
4fba4cd14c
fix: fix user folder init
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-03-06 17:52:24 +07:00
Robin Appelman
51019fda7a
fix: clearify logic around getMountsForFileId filtering
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-03-06 10:54:00 +07:00
Robin Appelman
e33b32095e
Revert "Filter mounts for file id before trying to get user information"
...
This reverts commit 1e2cf820c8 .
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-03-06 10:54:00 +07:00
Robin Appelman
9ea3f4ab8f
perf: use lazy user in UserMountCache for getting user for cached mount
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-03-06 10:53:55 +07: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 +07:00
Robin Appelman
963721330f
only get the path for the users cached mount info when we use it
...
most of the time we shouldn't need it so we can save joining on the filecache
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-02-09 09:50:43 +07:00
Robin Appelman
b942850af9
optimize UserMountCache::registerStorage
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-11-16 16:21:59 +07:00
Robin Appelman
efe68d012c
Merge pull request #39044 from nextcloud/more-empty-mount-checking
...
Fix root mounts not being setup in some cases
2023-10-24 16:54:05 +07:00
Jonas
7441ce2b11
enh(IMountManager): Add method to get MountPoint from CachedMountInfo
...
Signed-off-by: Jonas <jonas@freesources.org>
2023-10-23 20:50:24 +07:00
Hamid Dehnavi
ea06cf2f39
Convert isset ternary to null coalescing operator
...
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
2023-09-28 17:44:19 +07:00
Robin Appelman
5685d68bd3
add more checks to ensure mounts aren't empty
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-09-12 16:50:24 +07:00
Faraz Samapoor
e7cc7653b8
Refactors "strpos" calls in lib/private to improve code readability.
...
Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
2023-05-15 15:17:19 +07:00
Robin Appelman
f5e2b0b22f
allow storing multiple mounts for the same rootid in the mount cache
...
currently `[$userId, $rootId]` is used as the unique key for storing mounts in the mount cache,
however there are cases where the same rootid is mounted in multiple places for a user which currently leads to not all of those mounts being added to the cache.
Previously this didn't matter as the mount cache was only used to list users with access to a specific file, so a user having access to the file multiple times didn' change anything.
With 24 the mount cache is used for more cases and multiple mounts for the same id becomes relevant.
While I think there isn't a real negative effect atm besides missing the optimized path we should ensure that the mounts are properly listed
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-04-28 15:08:08 +07:00
Joas Schilling
6b0cef6b9a
Add transaction around mass mounts operations
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-03-07 19:58:55 +07:00
Robin Appelman
91d5f6a826
more filesystem setup performance instrumentation
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-02-10 11:11:13 +07:00
Robin Appelman
10767d7779
fix updating cached mounts that didn't have their mount provider set previously
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-08-16 13:47:41 +07:00
luz paz
368f83095d
Fix typos in lib/private subdirectory
...
Found via `codespell -q 3 -S l10n -L jus ./lib/private`
Signed-off-by: luz paz <luzpaz@github.com>
2022-07-27 08:52:17 +07:00
Carl Schwan
d5c23dbb9f
Move CappedMemoryCache to OCP
...
This is an helpful helper that should be used in more place than just
server and this is already the case with groupfodlers, deck, user_oidc
and more using it, so let's make it public
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-07-14 15:54:31 +07:00
Carl Schwan
ec6b83cc18
Add stricter psalm type for CappedMemoryCache
...
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-05-12 15:06:18 +07:00
Carl Schwan
dbdb9f6f11
Merge pull request #32034 from nextcloud/bugfix/noid/satisfy-binary-operation-order
...
Make the binary operation order explicit
2022-04-27 11:53:18 +07:00
Robin Appelman
561a2071e4
only register mounts that are new from providers that are new during a full setup
...
this fixes cases where during the (partial) setup of a shared mount a full setup is triggered
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-21 12:53:50 +07:00
Joas Schilling
49e62149d8
Make the binary operation order explicit
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-04-21 10:47:26 +07:00
Robin Appelman
99ac46d8f5
allow getting mounts by providers
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-04 14:57:56 +07:00
Côme Chilliet
765999f454
Merge pull request #31609 from nextcloud/fix/migrate-away-from-ilogger
...
Migrate from ILogger to LoggerInterface in lib/private
2022-03-29 09:39:38 +07:00
Vincent Petry
1bc86a95c4
Make phpcs happy in MountProviderCollection
...
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2022-03-24 20:26:42 +07:00
Robin Appelman
881e107543
Apply suggestions from code review
...
Co-authored-by: Louis <6653109+artonge@users.noreply.github.com>
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-24 17:41:37 +07:00
Robin Appelman
1179873f33
add comment for getMountForPath loop
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-24 17:36:59 +07:00
Robin Appelman
63ad99ba4a
fix method name
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-24 17:04:01 +07:00
Robin Appelman
d342c764f2
don't double setup provider when calling `setupForUser` after `setupForPath`
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-24 17:03:13 +07:00
Robin Appelman
506d29c095
update cached mounts when only specific providers have been setup
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-24 17:01:55 +07:00
Robin Appelman
469a684d45
allow getting mounts by provider
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-24 17:01:38 +07:00
Robin Appelman
04052a9594
allow getting cached mounts by path from the mount cache
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-24 17:01:12 +07:00
Côme Chilliet
6be7aa112f
Migrate from ILogger to LoggerInterface in lib/private
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-03-24 16:21:25 +07:00
Robin Appelman
07a7dcb824
move user mountpoint setup to setupmanager
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:30:12 +07:00
Robin Appelman
5c0fe93498
move teardown logic to SetupManager
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:29:50 +07:00
Robin Appelman
7630d7a934
more type hints for ICachedMountInfo and IMountManager
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-04 16:28:11 +07:00
Robin Appelman
cfb7923e08
store mountprovider for each mount in the mounts table
...
this enabled more fine grained filesystem setup
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-02-23 18:02:33 +07:00
Morris Jobke
2ae60b42ab
Merge pull request #26494 from rigrig/fix-php8-deprecations
...
Fix some php 8 warnings
2021-06-07 23:30:59 +07:00
John Molakvoæ (skjnldsv)
215aef3cbd
Update php licenses
...
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +07:00
Richard de Boer
f23d057ad9
Fix functions taking optional parameters before required ones
...
PHP 8 shows deprecation warnings about this, see #25806
Removes the "default" values, as they actually are required parameters anyway.
Signed-off-by: Richard de Boer <git@tubul.net>
2021-05-29 14:14:52 +07:00