From 9debc68a5a8d08380f4f7948c2ada20485cd4c9f Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Wed, 7 Feb 2024 16:03:18 +0100 Subject: [PATCH 01/10] add navigation class to fix layout issue --- solid/templates/applauncher.php | 2 +- solid/templates/profile.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/solid/templates/applauncher.php b/solid/templates/applauncher.php index 3e4077d..ac1c8ee 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 c4a05d8..5f21fd6 100644 --- a/solid/templates/profile.php +++ b/solid/templates/profile.php @@ -3,7 +3,7 @@ style('solid', 'style'); ?> -
+
inc('navigation/index')); ?>
From c9c31b184eedce5e3b98f03556b0852e32e6d259 Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Wed, 7 Feb 2024 16:04:57 +0100 Subject: [PATCH 02/10] move things to the register phase --- solid/lib/AppInfo/Application.php | 38 +++++++++++++------------------ 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/solid/lib/AppInfo/Application.php b/solid/lib/AppInfo/Application.php index 134cd7e..4295473 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; @@ -33,33 +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(IDBConnection::class) + ); + }); } public function boot(IBootContext $context): void { From a18eec69711b5131a45b861420f7da5f050e0425 Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Wed, 7 Feb 2024 16:06:20 +0100 Subject: [PATCH 03/10] declare support for Nextcloud 28 --- solid/appinfo/info.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solid/appinfo/info.xml b/solid/appinfo/info.xml index 0eed811..3719390 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 From 306da550d771323c2560b3a9d6007abfd16691db Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Wed, 7 Feb 2024 16:10:13 +0100 Subject: [PATCH 04/10] codesniffer fix --- solid/lib/AppInfo/Application.php | 1 - 1 file changed, 1 deletion(-) diff --git a/solid/lib/AppInfo/Application.php b/solid/lib/AppInfo/Application.php index 4295473..ce9058f 100644 --- a/solid/lib/AppInfo/Application.php +++ b/solid/lib/AppInfo/Application.php @@ -34,7 +34,6 @@ class Application extends App implements IBootstrap { */ public function __construct(array $urlParams = []) { parent::__construct(self::APP_ID, $urlParams); - } public function register(IRegistrationContext $context): void { From 5813add02cf0e1767da13b6bdc8a461144163715 Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Wed, 7 Feb 2024 16:22:55 +0100 Subject: [PATCH 05/10] add namespace --- solid/lib/AppInfo/Application.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/solid/lib/AppInfo/Application.php b/solid/lib/AppInfo/Application.php index ce9058f..5436450 100644 --- a/solid/lib/AppInfo/Application.php +++ b/solid/lib/AppInfo/Application.php @@ -25,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'; @@ -69,7 +70,7 @@ public function register(IRegistrationContext $context): void { $context->registerService(SolidWebhookMapper::class, function($c): SolidWebhookMapper { return new SolidWebhookMapper( - $c->get(IDBConnection::class) + $c->get(\OCP\IDBConnection::class) ); }); } From ec8f47cc4bfa02e44921b6c5b1f5ba1913940ce1 Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Wed, 7 Feb 2024 16:23:21 +0100 Subject: [PATCH 06/10] add ci NC28 --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 94893c5..8ecd06e 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 From d1974fd4b4ed60e2131bf9cad6ff5f6d1fffb0b5 Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Wed, 7 Feb 2024 16:37:09 +0100 Subject: [PATCH 07/10] remove allowInlineScript method - no longer available in NC-28 --- solid/lib/Controller/StorageController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solid/lib/Controller/StorageController.php b/solid/lib/Controller/StorageController.php index b424896..36f6851 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); From 30fdf12a037cb74fe118d76a80598b4060dda87c Mon Sep 17 00:00:00 2001 From: Yvo Brevoort Date: Wed, 7 Feb 2024 17:00:04 +0100 Subject: [PATCH 08/10] add solid logo --- solid/img/app.svg | 75 +++++++++++++---------------------------------- 1 file changed, 20 insertions(+), 55 deletions(-) diff --git a/solid/img/app.svg b/solid/img/app.svg index fe370f8..bf38e17 100644 --- a/solid/img/app.svg +++ b/solid/img/app.svg @@ -1,56 +1,21 @@ - - - - - - image/svg+xml - - - - - - - + + + + + + + + + + From 1322d9fa8b4baf94480b5df91d55f369a66434e9 Mon Sep 17 00:00:00 2001 From: Ben Peachey Date: Sun, 11 Feb 2024 13:12:40 +0100 Subject: [PATCH 09/10] Change `app.svg` to use less bytes. --- solid/img/app.svg | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/solid/img/app.svg b/solid/img/app.svg index bf38e17..d8535e8 100644 --- a/solid/img/app.svg +++ b/solid/img/app.svg @@ -1,21 +1,5 @@ - - - - - - - - - - + + + + From 22e6f67291192c6dc8aef10163d88f2fa0b85b9d Mon Sep 17 00:00:00 2001 From: Ben Peachey Date: Sun, 11 Feb 2024 13:15:27 +0100 Subject: [PATCH 10/10] Change `app.svg` to version optimized with svgomg. --- solid/img/app.svg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/solid/img/app.svg b/solid/img/app.svg index d8535e8..fa9e9e2 100644 --- a/solid/img/app.svg +++ b/solid/img/app.svg @@ -1,5 +1,5 @@ - - - + + +