Skip to content

Commit

Permalink
Merge pull request #44011 from nextcloud/sorbaugh/public-bundle
Browse files Browse the repository at this point in the history
feat: Adding PublicSectorBundle
  • Loading branch information
AndyScherzinger authored Mar 12, 2024
2 parents b6f2dac + af49278 commit b800de2
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 8 deletions.
1 change: 1 addition & 0 deletions lib/composer/composer/autoload_classmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
9 changes: 1 addition & 8 deletions lib/composer/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2
'OC\\' => 3,
'OCP\\' => 4,
),
'B' =>
array (
'Bamarni\\Composer\\Bin\\' => 21,
),
);

public static $prefixDirsPsr4 = array (
Expand All @@ -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 (
Expand Down Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions lib/private/App/AppStore/Bundles/BundleFetcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public function getBundles(): array {
new GroupwareBundle($this->l10n),
new SocialSharingBundle($this->l10n),
new EducationBundle($this->l10n),
new PublicSectorBundle($this->l10n),
];
}

Expand Down
51 changes: 51 additions & 0 deletions lib/private/App/AppStore/Bundles/PublicSectorBundle.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php
/**
* @copyright Copyright (c) 2024 Stephan Orbaugh <[email protected]>
*
* @author Stephan Orbaugh <[email protected]>
*
* @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 <http://www.gnu.org/licenses/>.
*
*/
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',
];
}

}
2 changes: 2 additions & 0 deletions tests/lib/App/AppStore/Bundles/BundleFetcherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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());
}
Expand Down

0 comments on commit b800de2

Please sign in to comment.