Skip to content

Commit

Permalink
fixup! fix(profile): make sure the app cannot be disabled as it was i…
Browse files Browse the repository at this point in the history
…n core

Signed-off-by: skjnldsv <[email protected]>
  • Loading branch information
skjnldsv committed Nov 13, 2024
1 parent a0aaaf2 commit d9909aa
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
6 changes: 3 additions & 3 deletions apps/profile/appinfo/info.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
- SPDX-FileCopyrightText: 2018-2024 Nextcloud GmbH and Nextcloud contributors
- SPDX-License-Identifier: AGPL-3.0-only
- SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
- SPDX-License-Identifier: AGPL-3.0-or-later
-->
<info xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd">
Expand All @@ -11,7 +11,7 @@
<description>Provides a customisable user profile interface.</description>
<version>1.0.0</version>
<licence>agpl</licence>
<author>Chris Ng</author>
<author>Nextcloud GmbH</author>
<namespace>Profile</namespace>
<category>social</category>
<bugs>https://github.com/nextcloud/server/issues</bugs>
Expand Down
1 change: 1 addition & 0 deletions build/integration/features/provisioning-v1.feature
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,7 @@ Feature: provisioning
| files_trashbin |
| files_versions |
| lookup_server_connector |
| profile |
| provisioning_api |
| settings |
| sharebymail |
Expand Down
1 change: 1 addition & 0 deletions tests/lib/App/AppManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,7 @@ public function testGetAppsNeedingUpgrade(): void {
'dav' => ['id' => 'dav'],
'files' => ['id' => 'files'],
'federatedfilesharing' => ['id' => 'federatedfilesharing'],
'profile' => ['id' => 'profile'],
'provisioning_api' => ['id' => 'provisioning_api'],
'lookup_server_connector' => ['id' => 'lookup_server_connector'],
'test1' => ['id' => 'test1', 'version' => '1.0.1', 'requiremax' => '9.0.0'],
Expand Down
8 changes: 6 additions & 2 deletions tests/lib/AppTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ public function appConfigValuesProvider() {
'federatedfilesharing',
'lookup_server_connector',
'oauth2',
'profile',
'provisioning_api',
'settings',
'theming',
Expand All @@ -368,6 +369,7 @@ public function appConfigValuesProvider() {
'federatedfilesharing',
'lookup_server_connector',
'oauth2',
'profile',
'provisioning_api',
'settings',
'theming',
Expand All @@ -392,6 +394,7 @@ public function appConfigValuesProvider() {
'federatedfilesharing',
'lookup_server_connector',
'oauth2',
'profile',
'provisioning_api',
'settings',
'theming',
Expand All @@ -416,6 +419,7 @@ public function appConfigValuesProvider() {
'federatedfilesharing',
'lookup_server_connector',
'oauth2',
'profile',
'provisioning_api',
'settings',
'theming',
Expand Down Expand Up @@ -524,11 +528,11 @@ public function testEnabledAppsCache(): void {
);

$apps = \OC_App::getEnabledApps();
$this->assertEquals(['files', 'app3', 'cloud_federation_api', 'dav', 'federatedfilesharing', 'lookup_server_connector', 'oauth2', 'provisioning_api', 'settings', 'theming', 'twofactor_backupcodes', 'viewer', 'workflowengine'], $apps);
$this->assertEquals(['files', 'app3', 'cloud_federation_api', 'dav', 'federatedfilesharing', 'lookup_server_connector', 'oauth2', 'profile', 'provisioning_api', 'settings', 'theming', 'twofactor_backupcodes', 'viewer', 'workflowengine'], $apps);

// mock should not be called again here
$apps = \OC_App::getEnabledApps();
$this->assertEquals(['files', 'app3', 'cloud_federation_api', 'dav', 'federatedfilesharing', 'lookup_server_connector', 'oauth2', 'provisioning_api', 'settings', 'theming', 'twofactor_backupcodes', 'viewer', 'workflowengine'], $apps);
$this->assertEquals(['files', 'app3', 'cloud_federation_api', 'dav', 'federatedfilesharing', 'lookup_server_connector', 'oauth2', 'profile', 'provisioning_api', 'settings', 'theming', 'twofactor_backupcodes', 'viewer', 'workflowengine'], $apps);

$this->restoreAppConfig();
\OC_User::setUserId(null);
Expand Down

0 comments on commit d9909aa

Please sign in to comment.