From 20c055f3b61cac03204d18de46e1d5a1fca3918c Mon Sep 17 00:00:00 2001 From: Arsalan Ul Haq Sohni Date: Tue, 17 Feb 2026 12:51:52 +0100 Subject: [PATCH 1/4] Revert "IONOS(appsettings): conditionally display developer documentation link based on configuration" This reverts commit 8217b8a4e4acd4a6d24634abfb21daf71b7ea4aa. --- .../lib/Controller/AppSettingsController.php | 9 +- .../settings/src/views/AppStoreNavigation.vue | 3 +- .../Controller/AppSettingsControllerTest.php | 99 ------------------- 3 files changed, 2 insertions(+), 109 deletions(-) diff --git a/apps/settings/lib/Controller/AppSettingsController.php b/apps/settings/lib/Controller/AppSettingsController.php index d76408010da79..c0ba0b556291b 100644 --- a/apps/settings/lib/Controller/AppSettingsController.php +++ b/apps/settings/lib/Controller/AppSettingsController.php @@ -35,7 +35,6 @@ use OCP\Files\SimpleFS\ISimpleFile; use OCP\Files\SimpleFS\ISimpleFolder; use OCP\Http\Client\IClientService; -use OCP\IAppConfig; use OCP\IConfig; use OCP\IGroup; use OCP\IL10N; @@ -75,7 +74,6 @@ public function __construct( private IInitialState $initialState, private AppDiscoverFetcher $discoverFetcher, private IClientService $clientService, - private IAppConfig $appConfig, ) { parent::__construct($appName, $request); $this->appData = $appDataFactory->get('appstore'); @@ -92,12 +90,7 @@ public function viewApps(): TemplateResponse { $this->initialState->provideInitialState('appstoreEnabled', $this->config->getSystemValueBool('appstoreenabled', true)); $this->initialState->provideInitialState('appstoreBundles', $this->getBundles()); - - // Conditionally set developer docs link based on configuration - $displayDocumentationLink = $this->appConfig->getValueBool('settings', 'display_documentation_link', true); - $developerDocsUrl = $displayDocumentationLink ? $this->urlGenerator->linkToDocs('developer-manual') : ''; - $this->initialState->provideInitialState('appstoreDeveloperDocs', $developerDocsUrl); - + $this->initialState->provideInitialState('appstoreDeveloperDocs', $this->urlGenerator->linkToDocs('developer-manual')); $this->initialState->provideInitialState('appstoreUpdateCount', count($this->getAppsWithUpdates())); if ($this->appManager->isInstalled('app_api')) { diff --git a/apps/settings/src/views/AppStoreNavigation.vue b/apps/settings/src/views/AppStoreNavigation.vue index 3507006c47d5b..a35cd94da95fb 100644 --- a/apps/settings/src/views/AppStoreNavigation.vue +++ b/apps/settings/src/views/AppStoreNavigation.vue @@ -91,8 +91,7 @@ - diff --git a/apps/settings/tests/Controller/AppSettingsControllerTest.php b/apps/settings/tests/Controller/AppSettingsControllerTest.php index 3c0df4532d79f..8adba2083296e 100644 --- a/apps/settings/tests/Controller/AppSettingsControllerTest.php +++ b/apps/settings/tests/Controller/AppSettingsControllerTest.php @@ -19,7 +19,6 @@ use OCP\AppFramework\Services\IInitialState; use OCP\Files\AppData\IAppDataFactory; use OCP\Http\Client\IClientService; -use OCP\IAppConfig; use OCP\IConfig; use OCP\IL10N; use OCP\INavigationManager; @@ -46,8 +45,6 @@ class AppSettingsControllerTest extends TestCase { private $l10n; /** @var IConfig|MockObject */ private $config; - /** @var IAppConfig|MockObject */ - private $appConfig; /** @var INavigationManager|MockObject */ private $navigationManager; private AppManager&MockObject $appManager; @@ -84,7 +81,6 @@ protected function setUp(): void { ->method('t') ->willReturnArgument(0); $this->config = $this->createMock(IConfig::class); - $this->appConfig = $this->createMock(IAppConfig::class); $this->navigationManager = $this->createMock(INavigationManager::class); $this->appManager = $this->createMock(AppManager::class); $this->categoryFetcher = $this->createMock(CategoryFetcher::class); @@ -116,7 +112,6 @@ protected function setUp(): void { $this->initialState, $this->discoverFetcher, $this->clientService, - $this->appConfig, ); } @@ -185,11 +180,6 @@ public function testViewApps(): void { ->method('getSystemValueBool') ->with('appstoreenabled', true) ->willReturn(true); - $this->appConfig - ->expects($this->once()) - ->method('getValueBool') - ->with('settings', 'display_documentation_link', true) - ->willReturn(true); $this->navigationManager ->expects($this->once()) ->method('setActiveEntry') @@ -235,11 +225,6 @@ public function testViewAppsAppstoreNotEnabled(): void { ->method('getSystemValueBool') ->with('appstoreenabled', true) ->willReturn(false); - $this->appConfig - ->expects($this->once()) - ->method('getValueBool') - ->with('settings', 'display_documentation_link', true) - ->willReturn(true); $this->navigationManager ->expects($this->once()) ->method('setActiveEntry') @@ -274,88 +259,4 @@ public function testViewAppsAppstoreNotEnabled(): void { $this->assertEquals($expected, $this->appSettingsController->viewApps()); } - - public function testDeveloperDocumentationLinkHiddenWhenConfigured(): void { - $this->installer->expects($this->any()) - ->method('isUpdateAvailable') - ->willReturn(false); - $this->bundleFetcher->expects($this->once())->method('getBundles')->willReturn([]); - $this->config - ->expects($this->once()) - ->method('getSystemValueBool') - ->with('appstoreenabled', true) - ->willReturn(true); - $this->appConfig - ->expects($this->once()) - ->method('getValueBool') - ->with('settings', 'display_documentation_link', true) - ->willReturn(false); - $this->navigationManager - ->expects($this->once()) - ->method('setActiveEntry') - ->with('core_apps'); - - // When display_documentation_link is false, linkToDocs should not be called - $this->urlGenerator - ->expects($this->never()) - ->method('linkToDocs'); - - $providedStates = []; - $this->initialState - ->expects($this->exactly(4)) - ->method('provideInitialState') - ->willReturnCallback(function ($key, $value) use (&$providedStates) { - $providedStates[$key] = $value; - }); - - $this->appSettingsController->viewApps(); - - // Assert that the developer docs state was provided with an empty string - $this->assertArrayHasKey('appstoreDeveloperDocs', $providedStates); - $this->assertEquals('', $providedStates['appstoreDeveloperDocs']); - } - - public function testDeveloperDocumentationLinkShownByDefault(): void { - $this->installer->expects($this->any()) - ->method('isUpdateAvailable') - ->willReturn(false); - $this->bundleFetcher->expects($this->once())->method('getBundles')->willReturn([]); - $this->config - ->expects($this->once()) - ->method('getSystemValueBool') - ->with('appstoreenabled', true) - ->willReturn(true); - $this->appConfig - ->expects($this->once()) - ->method('getValueBool') - ->with('settings', 'display_documentation_link', true) - ->willReturn(true); - $this->navigationManager - ->expects($this->once()) - ->method('setActiveEntry') - ->with('core_apps'); - - $developerDocsUrl = 'https://docs.nextcloud.com/server/latest/developer_manual/'; - - // When display_documentation_link is true (default), linkToDocs should be called - $this->urlGenerator - ->expects($this->once()) - ->method('linkToDocs') - ->with('developer-manual') - ->willReturn($developerDocsUrl); - - $providedStates = []; - $this->initialState - ->expects($this->exactly(4)) - ->method('provideInitialState') - ->willReturnCallback(function ($key, $value) use (&$providedStates) { - $providedStates[$key] = $value; - }); - - $this->appSettingsController->viewApps(); - - // Assert that the developer docs state was provided with the correct URL - $this->assertArrayHasKey('appstoreDeveloperDocs', $providedStates); - $this->assertEquals($developerDocsUrl, $providedStates['appstoreDeveloperDocs']); - } } From 2e2bcf182398cb5b9ede7e6e0abeed408ba77cc8 Mon Sep 17 00:00:00 2001 From: Arsalan Ul Haq Sohni Date: Tue, 17 Feb 2026 12:53:11 +0100 Subject: [PATCH 2/4] Revert "IONOS(tests): add tests for developer documentation link generation" This reverts commit a79215ce2e4d3d3f8ccc3283d6ae085579e61352. --- .../Controller/AppSettingsControllerTest.php | 28 ++----------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/apps/settings/tests/Controller/AppSettingsControllerTest.php b/apps/settings/tests/Controller/AppSettingsControllerTest.php index 8adba2083296e..f72bd45a3d234 100644 --- a/apps/settings/tests/Controller/AppSettingsControllerTest.php +++ b/apps/settings/tests/Controller/AppSettingsControllerTest.php @@ -185,21 +185,9 @@ public function testViewApps(): void { ->method('setActiveEntry') ->with('core_apps'); - // Test that developer docs link is generated correctly - $this->urlGenerator - ->expects($this->once()) - ->method('linkToDocs') - ->with('developer-manual') - ->willReturn('https://docs.nextcloud.com/server/latest/developer_manual/'); - $this->initialState ->expects($this->exactly(4)) - ->method('provideInitialState') - ->willReturnCallback(function ($key, $value) { - if ($key === 'appstoreDeveloperDocs') { - $this->assertEquals('https://docs.nextcloud.com/server/latest/developer_manual/', $value); - } - }); + ->method('provideInitialState'); $policy = new ContentSecurityPolicy(); $policy->addAllowedImageDomain('https://usercontent.apps.nextcloud.com'); @@ -230,21 +218,9 @@ public function testViewAppsAppstoreNotEnabled(): void { ->method('setActiveEntry') ->with('core_apps'); - // Test that developer docs link is still generated even when appstore is disabled - $this->urlGenerator - ->expects($this->once()) - ->method('linkToDocs') - ->with('developer-manual') - ->willReturn('https://docs.nextcloud.com/server/latest/developer_manual/'); - $this->initialState ->expects($this->exactly(4)) - ->method('provideInitialState') - ->willReturnCallback(function ($key, $value) { - if ($key === 'appstoreDeveloperDocs') { - $this->assertEquals('https://docs.nextcloud.com/server/latest/developer_manual/', $value); - } - }); + ->method('provideInitialState'); $policy = new ContentSecurityPolicy(); $policy->addAllowedImageDomain('https://usercontent.apps.nextcloud.com'); From 979f07b508b1d7a79e98a45e4c0051d2adf16dad Mon Sep 17 00:00:00 2001 From: Arsalan Ul Haq Sohni Date: Tue, 2 Dec 2025 11:49:30 +0100 Subject: [PATCH 3/4] docs: remove developer documentation link Signed-off-by: Arsalan Ul Haq Sohni --- apps/settings/lib/Controller/AppSettingsController.php | 1 - apps/settings/src/views/AppStoreNavigation.vue | 4 ---- 2 files changed, 5 deletions(-) diff --git a/apps/settings/lib/Controller/AppSettingsController.php b/apps/settings/lib/Controller/AppSettingsController.php index c0ba0b556291b..370ff883a769f 100644 --- a/apps/settings/lib/Controller/AppSettingsController.php +++ b/apps/settings/lib/Controller/AppSettingsController.php @@ -90,7 +90,6 @@ public function viewApps(): TemplateResponse { $this->initialState->provideInitialState('appstoreEnabled', $this->config->getSystemValueBool('appstoreenabled', true)); $this->initialState->provideInitialState('appstoreBundles', $this->getBundles()); - $this->initialState->provideInitialState('appstoreDeveloperDocs', $this->urlGenerator->linkToDocs('developer-manual')); $this->initialState->provideInitialState('appstoreUpdateCount', count($this->getAppsWithUpdates())); if ($this->appManager->isInstalled('app_api')) { diff --git a/apps/settings/src/views/AppStoreNavigation.vue b/apps/settings/src/views/AppStoreNavigation.vue index a35cd94da95fb..4d8a2b3e48ce1 100644 --- a/apps/settings/src/views/AppStoreNavigation.vue +++ b/apps/settings/src/views/AppStoreNavigation.vue @@ -91,9 +91,6 @@ - @@ -115,7 +112,6 @@ import NcLoadingIcon from '@nextcloud/vue/dist/Components/NcLoadingIcon.js' import APPSTORE_CATEGORY_ICONS from '../constants/AppstoreCategoryIcons.ts' const appstoreEnabled = loadState('settings', 'appstoreEnabled', true) -const developerDocsUrl = loadState('settings', 'appstoreDeveloperDocs', '') const store = useAppsStore() const categories = computed(() => store.categories) From 3258d2b781c19a9b30b8d95b7a3a0a0516d58f4a Mon Sep 17 00:00:00 2001 From: Arsalan Ul Haq Sohni Date: Tue, 17 Feb 2026 14:39:23 +0100 Subject: [PATCH 4/4] Revert "IONOS(config): add developer_documentation_url boolean and build ncw core config" Signed-off-by: Arsalan Ul Haq Sohni --- IONOS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IONOS b/IONOS index 30be7051586fa..7d2d1bb7bbfee 160000 --- a/IONOS +++ b/IONOS @@ -1 +1 @@ -Subproject commit 30be7051586faae63a143d061925045dd800dba5 +Subproject commit 7d2d1bb7bbfee8e7fd0e3443a18bf4c303d53095