From 82a17248f0212e6039562bfc72ac6ffea6f307ea Mon Sep 17 00:00:00 2001 From: sorbaugh Date: Tue, 5 Mar 2024 22:22:45 +0100 Subject: [PATCH 1/2] feat: Adding PublicSectorBundle Signed-off-by: Christopher Ng --- lib/composer/composer/autoload_classmap.php | 1 + lib/composer/composer/autoload_static.php | 9 +--- .../App/AppStore/Bundles/BundleFetcher.php | 1 + .../AppStore/Bundles/PublicSectorBundle.php | 51 +++++++++++++++++++ 4 files changed, 54 insertions(+), 8 deletions(-) create mode 100644 lib/private/App/AppStore/Bundles/PublicSectorBundle.php diff --git a/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php index 4742c6c305442..d22c5ca817d48 100644 --- a/lib/composer/composer/autoload_classmap.php +++ b/lib/composer/composer/autoload_classmap.php @@ -885,6 +885,7 @@ 'OC\\App\\AppStore\\Bundles\\EnterpriseBundle' => $baseDir . '/lib/private/App/AppStore/Bundles/EnterpriseBundle.php', 'OC\\App\\AppStore\\Bundles\\GroupwareBundle' => $baseDir . '/lib/private/App/AppStore/Bundles/GroupwareBundle.php', 'OC\\App\\AppStore\\Bundles\\HubBundle' => $baseDir . '/lib/private/App/AppStore/Bundles/HubBundle.php', + 'OC\\App\\AppStore\\Bundles\\PublicSectorBundle' => $baseDir . '/lib/private/App/AppStore/Bundles/PublicSectorBundle.php', 'OC\\App\\AppStore\\Bundles\\SocialSharingBundle' => $baseDir . '/lib/private/App/AppStore/Bundles/SocialSharingBundle.php', 'OC\\App\\AppStore\\Fetcher\\AppFetcher' => $baseDir . '/lib/private/App/AppStore/Fetcher/AppFetcher.php', 'OC\\App\\AppStore\\Fetcher\\CategoryFetcher' => $baseDir . '/lib/private/App/AppStore/Fetcher/CategoryFetcher.php', diff --git a/lib/composer/composer/autoload_static.php b/lib/composer/composer/autoload_static.php index f9b1d2eec8c44..349dfedeeb556 100644 --- a/lib/composer/composer/autoload_static.php +++ b/lib/composer/composer/autoload_static.php @@ -17,10 +17,6 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2 'OC\\' => 3, 'OCP\\' => 4, ), - 'B' => - array ( - 'Bamarni\\Composer\\Bin\\' => 21, - ), ); public static $prefixDirsPsr4 = array ( @@ -36,10 +32,6 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2 array ( 0 => __DIR__ . '/../../..' . '/lib/public', ), - 'Bamarni\\Composer\\Bin\\' => - array ( - 0 => __DIR__ . '/..' . '/bamarni/composer-bin-plugin/src', - ), ); public static $fallbackDirsPsr4 = array ( @@ -926,6 +918,7 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2 'OC\\App\\AppStore\\Bundles\\EnterpriseBundle' => __DIR__ . '/../../..' . '/lib/private/App/AppStore/Bundles/EnterpriseBundle.php', 'OC\\App\\AppStore\\Bundles\\GroupwareBundle' => __DIR__ . '/../../..' . '/lib/private/App/AppStore/Bundles/GroupwareBundle.php', 'OC\\App\\AppStore\\Bundles\\HubBundle' => __DIR__ . '/../../..' . '/lib/private/App/AppStore/Bundles/HubBundle.php', + 'OC\\App\\AppStore\\Bundles\\PublicSectorBundle' => __DIR__ . '/../../..' . '/lib/private/App/AppStore/Bundles/PublicSectorBundle.php', 'OC\\App\\AppStore\\Bundles\\SocialSharingBundle' => __DIR__ . '/../../..' . '/lib/private/App/AppStore/Bundles/SocialSharingBundle.php', 'OC\\App\\AppStore\\Fetcher\\AppFetcher' => __DIR__ . '/../../..' . '/lib/private/App/AppStore/Fetcher/AppFetcher.php', 'OC\\App\\AppStore\\Fetcher\\CategoryFetcher' => __DIR__ . '/../../..' . '/lib/private/App/AppStore/Fetcher/CategoryFetcher.php', diff --git a/lib/private/App/AppStore/Bundles/BundleFetcher.php b/lib/private/App/AppStore/Bundles/BundleFetcher.php index 7ac70591e8aee..53e82b39b81f1 100644 --- a/lib/private/App/AppStore/Bundles/BundleFetcher.php +++ b/lib/private/App/AppStore/Bundles/BundleFetcher.php @@ -42,6 +42,7 @@ public function getBundles(): array { new GroupwareBundle($this->l10n), new SocialSharingBundle($this->l10n), new EducationBundle($this->l10n), + new PublicSectorBundle($this->l10n), ]; } diff --git a/lib/private/App/AppStore/Bundles/PublicSectorBundle.php b/lib/private/App/AppStore/Bundles/PublicSectorBundle.php new file mode 100644 index 0000000000000..6634e2ff41ea7 --- /dev/null +++ b/lib/private/App/AppStore/Bundles/PublicSectorBundle.php @@ -0,0 +1,51 @@ + + * + * @author Stephan Orbaugh + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ +namespace OC\App\AppStore\Bundles; + +class PublicSectorBundle extends Bundle { + /** + * {@inheritDoc} + */ + public function getName(): string { + return $this->l10n->t('Public sector bundle'); + } + + /** + * {@inheritDoc} + */ + public function getAppIdentifiers(): array { + + return [ + 'files_confidential', + 'forms', + 'collectives', + 'files_antivirus', + 'twofactor_nextcloud_notification', + 'tables', + 'richdocuments', + 'admin_audit', + 'files_retention', + ]; + } + +} From af49278c5fb98e3bea7844e8a0a4540a3b3e3270 Mon Sep 17 00:00:00 2001 From: Christopher Ng Date: Tue, 12 Mar 2024 10:46:28 -0700 Subject: [PATCH 2/2] test: Update test for PublicSectorBundle Signed-off-by: Christopher Ng --- tests/lib/App/AppStore/Bundles/BundleFetcherTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/lib/App/AppStore/Bundles/BundleFetcherTest.php b/tests/lib/App/AppStore/Bundles/BundleFetcherTest.php index c1fe5ef328a74..86ddd12f1e73a 100644 --- a/tests/lib/App/AppStore/Bundles/BundleFetcherTest.php +++ b/tests/lib/App/AppStore/Bundles/BundleFetcherTest.php @@ -26,6 +26,7 @@ use OC\App\AppStore\Bundles\EnterpriseBundle; use OC\App\AppStore\Bundles\GroupwareBundle; use OC\App\AppStore\Bundles\HubBundle; +use OC\App\AppStore\Bundles\PublicSectorBundle; use OC\App\AppStore\Bundles\SocialSharingBundle; use OCP\IL10N; use Test\TestCase; @@ -53,6 +54,7 @@ public function testGetBundles() { new GroupwareBundle($this->l10n), new SocialSharingBundle($this->l10n), new EducationBundle($this->l10n), + new PublicSectorBundle($this->l10n), ]; $this->assertEquals($expected, $this->bundleFetcher->getBundles()); }