From 59a24c4f1ab8e1e4e1dd415e7c35f89f0ae94db5 Mon Sep 17 00:00:00 2001 From: Josh Date: Mon, 18 Aug 2025 12:06:11 -0400 Subject: [PATCH 1/4] chore(Installer): drop unused public/remote handler code Signed-off-by: Josh --- lib/private/Installer.php | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/lib/private/Installer.php b/lib/private/Installer.php index fd737d286ad81..d3496c614da39 100644 --- a/lib/private/Installer.php +++ b/lib/private/Installer.php @@ -123,14 +123,6 @@ public function installApp(string $appId, bool $forceEnable = false): string { $config->setAppValue($info['id'], 'installed_version', \OCP\Server::get(IAppManager::class)->getAppVersion($info['id'], false)); $config->setAppValue($info['id'], 'enabled', 'no'); - //set remote/public handlers - foreach ($info['remote'] as $name => $path) { - $config->setAppValue('core', 'remote_' . $name, $info['id'] . '/' . $path); - } - foreach ($info['public'] as $name => $path) { - $config->setAppValue('core', 'public_' . $name, $info['id'] . '/' . $path); - } - OC_App::setAppTypes($info['id']); return $info['id']; @@ -616,14 +608,6 @@ public static function installShippedApp(string $app, ?IOutput $output = null): $config->setAppValue($app, 'ocsid', $info['ocsid']); } - //set remote/public handlers - foreach ($info['remote'] as $name => $path) { - $config->setAppValue('core', 'remote_' . $name, $app . '/' . $path); - } - foreach ($info['public'] as $name => $path) { - $config->setAppValue('core', 'public_' . $name, $app . '/' . $path); - } - OC_App::setAppTypes($info['id']); return $info['id']; From 1ebd1aee2f4c14d8cbef7b418dea5abe1fdabbce Mon Sep 17 00:00:00 2001 From: Josh Date: Mon, 18 Aug 2025 12:12:54 -0400 Subject: [PATCH 2/4] chore(OC_App): drop unused public/remote handler code Also drops long ago deprecated and removed ocsid support (nextcloud/server#6928 & nextcloud/appstore#489). Signed-off-by: Josh --- lib/private/legacy/OC_App.php | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/lib/private/legacy/OC_App.php b/lib/private/legacy/OC_App.php index 6dbef42594bf9..e0d80af5966bd 100644 --- a/lib/private/legacy/OC_App.php +++ b/lib/private/legacy/OC_App.php @@ -682,19 +682,6 @@ public static function updateApp(string $appId): bool { self::setupBackgroundJobs($appData['background-jobs']); - //set remote/public handlers - if (array_key_exists('ocsid', $appData)) { - \OC::$server->getConfig()->setAppValue($appId, 'ocsid', $appData['ocsid']); - } elseif (\OC::$server->getConfig()->getAppValue($appId, 'ocsid') !== '') { - \OC::$server->getConfig()->deleteAppValue($appId, 'ocsid'); - } - foreach ($appData['remote'] as $name => $path) { - \OC::$server->getConfig()->setAppValue('core', 'remote_' . $name, $appId . '/' . $path); - } - foreach ($appData['public'] as $name => $path) { - \OC::$server->getConfig()->setAppValue('core', 'public_' . $name, $appId . '/' . $path); - } - self::setAppTypes($appId); $version = Server::get(\OCP\App\IAppManager::class)->getAppVersion($appId); From cd64a9cd6e11142be82ff58197a245442816c3d3 Mon Sep 17 00:00:00 2001 From: Josh Date: Mon, 18 Aug 2025 12:15:02 -0400 Subject: [PATCH 3/4] chore(provisioning_api): drop unused public/remote handler code Signed-off-by: Josh --- apps/provisioning_api/lib/Controller/AppConfigController.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/apps/provisioning_api/lib/Controller/AppConfigController.php b/apps/provisioning_api/lib/Controller/AppConfigController.php index d8af1f38d9509..d3fdef5a3a5e1 100644 --- a/apps/provisioning_api/lib/Controller/AppConfigController.php +++ b/apps/provisioning_api/lib/Controller/AppConfigController.php @@ -196,10 +196,6 @@ protected function verifyConfigKey(string $app, string $key, string $value) { throw new \InvalidArgumentException('The given key can not be set'); } - if ($app === 'core' && (strpos($key, 'public_') === 0 || strpos($key, 'remote_') === 0)) { - throw new \InvalidArgumentException('The given key can not be set'); - } - if ($app === 'files' && $key === 'default_quota' && $value === 'none' From 255ceb6bac80c05a7da6ad80776e1ebfeae2a950 Mon Sep 17 00:00:00 2001 From: Josh Date: Mon, 18 Aug 2025 12:19:15 -0400 Subject: [PATCH 4/4] chore(provisioning_api): drop unused public/remote handler code from tests Signed-off-by: Josh --- .../tests/Controller/AppConfigControllerTest.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/apps/provisioning_api/tests/Controller/AppConfigControllerTest.php b/apps/provisioning_api/tests/Controller/AppConfigControllerTest.php index 1b09838cbc39e..8c03b89dfd36f 100644 --- a/apps/provisioning_api/tests/Controller/AppConfigControllerTest.php +++ b/apps/provisioning_api/tests/Controller/AppConfigControllerTest.php @@ -359,8 +359,6 @@ public function testVerifyAppIdThrows(string $app): void { public static function dataVerifyConfigKey(): array { return [ ['activity', 'abc', ''], - ['dav', 'public_route', ''], - ['files', 'remote_route', ''], ['core', 'encryption_enabled', 'yes'], ]; } @@ -379,10 +377,6 @@ public static function dataVerifyConfigKeyThrows(): array { ['contacts', 'types', ''], ['core', 'encryption_enabled', 'no'], ['core', 'encryption_enabled', ''], - ['core', 'public_files', ''], - ['core', 'public_dav', ''], - ['core', 'remote_files', ''], - ['core', 'remote_dav', ''], ]; }