Robin Appelman
dec880b285
optimize builtin storage wrappers
Signed-off-by: Robin Appelman <robin@icewind.nl>
8 months ago
Robin Appelman
1eb3293e53
setup filesystem wrappers before we mark the root as setup
Signed-off-by: Robin Appelman <robin@icewind.nl>
11 months ago
Robin Appelman
b6c3507aa0
only determine quota_include_external_storage once for quota wrapper
Signed-off-by: Robin Appelman <robin@icewind.nl>
10 months ago
Robin Appelman
e73889a240
cleanup di for share permissions wrapper
Signed-off-by: Robin Appelman <robin@icewind.nl>
10 months ago
Robin Appelman
a031bc4788
more share permission logic to storage wrapper
this way we only have to determine the share permissions once
Signed-off-by: Robin Appelman <robin@icewind.nl>
10 months ago
Faraz Samapoor
e7cc7653b8
Refactors "strpos" calls in lib/private to improve code readability.
Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
1 year ago
Robin Appelman
fb1095f0f6
do onetime user setup before getting any mount from providers
this fixes a race condition where wrappers weren't properly applied if when a mount provider creates the storage instance one mountpoint creation instead of lazily
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 year ago
Robin Appelman
91d5f6a826
more filesystem setup performance instrumentation
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 year ago
Côme Chilliet
f5c361cf44
composer run cs:fix
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 year ago
Robin Appelman
841a6a084e
delay updating setup providers untill we register the mounts
otherwise the fallback to a full setup for a missing cached mount provider will lead to a race condition
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 year ago
Robin Appelman
bd91c56539
get quota for user only when needed
always apply the wrapper but have the wrapper get the quota lazily only when an operation where quota is applied is performed
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 year ago
Robin Appelman
13eef55a92
always triger setup of builtin storage wrappers
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 year ago
Jonas
74e9ef0fb1
Fix listening for circle events in SetupManager
So far, SetupManager listened for deprecated events that are no longer
triggered. Instead, use the circle events that actually get triggered
when adding or removing a circle or circle member. Also, these events
get triggered on each instance of a globalscale setup.
Fixes: #33210
Signed-off-by: Jonas <jonas@freesources.org>
2 years ago
Robin Appelman
5c768f980e
fix mounts mounted at the users home
this fixes external storages with '/' as mountpoint
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Robin Appelman
a937ab03dd
perform onetime setup earlier to ensure wrappers are registered on time
this fixes an issue with wrappers like encryption not always being applied to mountpoint that create the storage object directly (such as external storage)
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Vincent Petry
23403ef693
Allow compatibility wrapper on local external storage
The check was likely in place to prevent adding the wrapper on the root
and home storage, which is not possible anyway since the encoding option cannot
be set on that mount.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2 years ago
Robin Appelman
b36dfd8f11
Only need to setup root for groupfolders
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Robin Appelman
bbf283f818
cache fullSetupRequired locally
no need to hit redis every time
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
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>
2 years ago
Robin Appelman
54e52e9b5e
always do full setup for home folder with submounts
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Robin Appelman
bdc86e9486
add missing return
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Robin Appelman
791dc509d3
only setup home mount when getting home folder
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Robin Appelman
99ac46d8f5
allow getting mounts by providers
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
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>
2 years ago
Robin Appelman
b7a7425fbd
make mount cache duration configurable
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Robin Appelman
70c37c2717
fmt
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Robin Appelman
89919b0e24
invalidate mount cache on circles change
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Robin Appelman
15c9a3114a
perform full setup if a cached mount doesn't have a provider set
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Robin Appelman
d342c764f2
don't double setup provider when calling `setupForUser` after `setupForPath`
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Robin Appelman
6b085b6fd1
add logic to perform a full filesystem setup when needed
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Robin Appelman
506d29c095
update cached mounts when only specific providers have been setup
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Robin Appelman
79f6742410
improve lazy UserFolder
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Robin Appelman
19c64cf8b6
setup only relevant mounts when possible
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Robin Appelman
577b1fa856
setup for current user when finding mounts in the root
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Robin Appelman
917c74e214
type fixes
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Robin Appelman
07a7dcb824
move user mountpoint setup to setupmanager
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Robin Appelman
22875bf367
move logic to decide what to setup to setupmanager
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Robin Appelman
1c468129af
adjust tests to new fs setup
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Robin Appelman
5c0fe93498
move teardown logic to SetupManager
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Robin Appelman
15ff65c12f
start moving filesystem setup logic to it's own place
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago