Browse Source
feat(files): Mark homefolder as overwritten when an external storage mounted at / exists
feat(files): Mark homefolder as overwritten when an external storage mounted at / exists
Signed-off-by: Robin Appelman <robin@icewind.nl> Signed-off-by: Louis Chemineau <louis@chmn.me>pull/51145/head
Failed to extract signature
12 changed files with 101 additions and 28 deletions
-
2apps/files_external/appinfo/info.xml
-
1apps/files_external/composer/composer/autoload_classmap.php
-
1apps/files_external/composer/composer/autoload_static.php
-
35apps/files_external/lib/Migration/Version1025Date20250228162604.php
-
28apps/files_external/lib/Service/DBConfigService.php
-
28apps/files_external/lib/Service/StoragesService.php
-
12apps/files_external/lib/Service/UserGlobalStoragesService.php
-
10apps/files_external/lib/Service/UserStoragesService.php
-
2apps/files_external/tests/Service/GlobalStoragesServiceTest.php
-
5apps/files_external/tests/Service/StoragesServiceTestCase.php
-
1apps/files_external/tests/Service/UserGlobalStoragesServiceTest.php
-
4apps/files_external/tests/Service/UserStoragesServiceTest.php
@ -0,0 +1,35 @@ |
|||
<?php |
|||
|
|||
declare(strict_types=1); |
|||
|
|||
/** |
|||
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors |
|||
* SPDX-License-Identifier: AGPL-3.0-or-later |
|||
*/ |
|||
|
|||
namespace OCA\Files_External\Migration; |
|||
|
|||
use Closure; |
|||
use OCA\Files_External\Service\GlobalStoragesService; |
|||
use OCP\DB\ISchemaWrapper; |
|||
use OCP\IAppConfig; |
|||
use OCP\Migration\IOutput; |
|||
use OCP\Migration\SimpleMigrationStep; |
|||
|
|||
/** |
|||
* Check for any external storage overwriting the home folder |
|||
*/ |
|||
class Version1025Date20250228162604 extends SimpleMigrationStep { |
|||
public function __construct( |
|||
private GlobalStoragesService $globalStoragesServices, |
|||
private IAppConfig $appConfig, |
|||
) { |
|||
} |
|||
|
|||
/** |
|||
* @param Closure(): ISchemaWrapper $schemaClosure |
|||
*/ |
|||
public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options): void { |
|||
$this->globalStoragesServices->updateOverwriteHomeFolders(); |
|||
} |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue