diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 94893c5c..8ecd06ee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,6 +37,7 @@ jobs: - 25 - 26 - 27 + - 28 steps: - name: Create docker tag from git reference @@ -85,13 +86,14 @@ jobs: - 25 - 26 - 27 + - 28 test: - 'solidtestsuite/solid-crud-tests:v7.0.5' - 'solidtestsuite/web-access-control-tests:v7.1.0' - 'solidtestsuite/webid-provider-tests:v2.1.0' # Prevent EOL or non-stable versions of Nextcloud to fail the test-suite - continue-on-error: ${{ contains(fromJson('[25,26,27]'), matrix.nextcloud_version) == false }} + continue-on-error: ${{ contains(fromJson('[25,26,27,28]'), matrix.nextcloud_version) == false }} steps: - name: Create docker tag from git reference diff --git a/solid/appinfo/info.xml b/solid/appinfo/info.xml index 0eed811f..3719390b 100644 --- a/solid/appinfo/info.xml +++ b/solid/appinfo/info.xml @@ -18,7 +18,7 @@ IMPORTANT: See https://github.com/pdsinterop/solid-nextcloud/blob/main/INSTALL.m integration https://github.com/pdsinterop/solid-nextcloud/issues - + \OCA\Solid\Settings diff --git a/solid/img/app.svg b/solid/img/app.svg index fe370f80..fa9e9e28 100644 --- a/solid/img/app.svg +++ b/solid/img/app.svg @@ -1,56 +1,5 @@ - - - - - - image/svg+xml - - - - - - - + + + + diff --git a/solid/lib/AppInfo/Application.php b/solid/lib/AppInfo/Application.php index 134cd7ee..5436450b 100644 --- a/solid/lib/AppInfo/Application.php +++ b/solid/lib/AppInfo/Application.php @@ -10,6 +10,8 @@ use OC\Server; use OCA\Solid\Service\UserService; +use OCA\Solid\Service\SolidWebhookService; +use OCA\Solid\Db\SolidWebhookMapper; use OCA\Solid\WellKnown\OpenIdConfigurationHandler; use OCA\Solid\WellKnown\SolidHandler; use OCA\Solid\Middleware\SolidCorsMiddleware; @@ -23,6 +25,7 @@ use OCP\IServerContainer; use OCP\Settings\IManager; use OCP\Util; +use OCP\IDBConnection; class Application extends App implements IBootstrap { public const APP_ID = 'solid'; @@ -32,34 +35,12 @@ class Application extends App implements IBootstrap { */ public function __construct(array $urlParams = []) { parent::__construct(self::APP_ID, $urlParams); - - $container = $this->getContainer(); - - $container->registerService(SolidCorsMiddleware::class, function($c): SolidCorsMiddleware { - return new SolidCorsMiddleware( - $c->get(IRequest::class) - ); - }); - - // executed in the order that it is registered - $container->registerMiddleware(SolidCorsMiddleware::class); - - $container->registerService(SolidWebhookService::class, function($c): SolidWebhookService { - return new SolidWebhookService( - $c->query(SolidWebhookMapper::class) - ); - }); - - $container->registerService(SolidWebhookMapper::class, function($c): SolidWebhookMapper { - return new SolidWebhookMapper( - $c->get(IDBConnection::class) - ); - }); } public function register(IRegistrationContext $context): void { $context->registerWellKnownHandler(\OCA\Solid\WellKnown\OpenIdConfigurationHandler::class); $context->registerWellKnownHandler(\OCA\Solid\WellKnown\SolidHandler::class); + $context->registerMiddleware(SolidCorsMiddleware::class); /** * Core class wrappers @@ -79,6 +60,19 @@ public function register(IRegistrationContext $context): void { $context->registerService('User', function($c) { return $c->query('UserSession')->getUser(); }); + + /* webhook DB services */ + $context->registerService(SolidWebhookService::class, function($c): SolidWebhookService { + return new SolidWebhookService( + $c->query(SolidWebhookMapper::class) + ); + }); + + $context->registerService(SolidWebhookMapper::class, function($c): SolidWebhookMapper { + return new SolidWebhookMapper( + $c->get(\OCP\IDBConnection::class) + ); + }); } public function boot(IBootContext $context): void { diff --git a/solid/lib/Controller/StorageController.php b/solid/lib/Controller/StorageController.php index b424896f..36f68513 100644 --- a/solid/lib/Controller/StorageController.php +++ b/solid/lib/Controller/StorageController.php @@ -439,7 +439,7 @@ private function respond($response) { $policy->addAllowedFontDomain("*"); $policy->addAllowedConnectDomain("*"); $policy->allowInlineStyle(true); - $policy->allowInlineScript(true); + // $policy->allowInlineScript(true); - removed, this function no longer exists in NC28 $policy->allowEvalScript(true); $result->setContentSecurityPolicy($policy); diff --git a/solid/templates/applauncher.php b/solid/templates/applauncher.php index 3e4077df..ac1c8eed 100644 --- a/solid/templates/applauncher.php +++ b/solid/templates/applauncher.php @@ -3,7 +3,7 @@ style('solid', 'style'); ?> -
+
inc('navigation/index')); ?>
diff --git a/solid/templates/profile.php b/solid/templates/profile.php index c4a05d8a..5f21fd68 100644 --- a/solid/templates/profile.php +++ b/solid/templates/profile.php @@ -3,7 +3,7 @@ style('solid', 'style'); ?> -
+
inc('navigation/index')); ?>