Skip to content

Commit eb2ae68

Browse files
authored
Merge pull request #151 from pdsinterop/feature/nextcloud28
Feature/nextcloud28
2 parents 1f46e74 + 22e6f67 commit eb2ae68

7 files changed

Lines changed: 28 additions & 83 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
- 25
3838
- 26
3939
- 27
40+
- 28
4041

4142
steps:
4243
- name: Create docker tag from git reference
@@ -85,13 +86,14 @@ jobs:
8586
- 25
8687
- 26
8788
- 27
89+
- 28
8890
test:
8991
- 'solidtestsuite/solid-crud-tests:v7.0.5'
9092
- 'solidtestsuite/web-access-control-tests:v7.1.0'
9193
- 'solidtestsuite/webid-provider-tests:v2.1.0'
9294

9395
# Prevent EOL or non-stable versions of Nextcloud to fail the test-suite
94-
continue-on-error: ${{ contains(fromJson('[25,26,27]'), matrix.nextcloud_version) == false }}
96+
continue-on-error: ${{ contains(fromJson('[25,26,27,28]'), matrix.nextcloud_version) == false }}
9597

9698
steps:
9799
- name: Create docker tag from git reference

solid/appinfo/info.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ IMPORTANT: See [INSTALL.md](https://github.com/pdsinterop/solid-nextcloud/blob/m
1818
<category>integration</category>
1919
<bugs>https://github.com/pdsinterop/solid-nextcloud/issues</bugs>
2020
<dependencies>
21-
<nextcloud min-version="25" max-version="27"/>
21+
<nextcloud min-version="25" max-version="28"/>
2222
</dependencies>
2323
<settings>
2424
<admin>\OCA\Solid\Settings</admin>

solid/img/app.svg

Lines changed: 4 additions & 55 deletions
Loading

solid/lib/AppInfo/Application.php

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
use OC\Server;
1111

1212
use OCA\Solid\Service\UserService;
13+
use OCA\Solid\Service\SolidWebhookService;
14+
use OCA\Solid\Db\SolidWebhookMapper;
1315
use OCA\Solid\WellKnown\OpenIdConfigurationHandler;
1416
use OCA\Solid\WellKnown\SolidHandler;
1517
use OCA\Solid\Middleware\SolidCorsMiddleware;
@@ -23,6 +25,7 @@
2325
use OCP\IServerContainer;
2426
use OCP\Settings\IManager;
2527
use OCP\Util;
28+
use OCP\IDBConnection;
2629

2730
class Application extends App implements IBootstrap {
2831
public const APP_ID = 'solid';
@@ -32,34 +35,12 @@ class Application extends App implements IBootstrap {
3235
*/
3336
public function __construct(array $urlParams = []) {
3437
parent::__construct(self::APP_ID, $urlParams);
35-
36-
$container = $this->getContainer();
37-
38-
$container->registerService(SolidCorsMiddleware::class, function($c): SolidCorsMiddleware {
39-
return new SolidCorsMiddleware(
40-
$c->get(IRequest::class)
41-
);
42-
});
43-
44-
// executed in the order that it is registered
45-
$container->registerMiddleware(SolidCorsMiddleware::class);
46-
47-
$container->registerService(SolidWebhookService::class, function($c): SolidWebhookService {
48-
return new SolidWebhookService(
49-
$c->query(SolidWebhookMapper::class)
50-
);
51-
});
52-
53-
$container->registerService(SolidWebhookMapper::class, function($c): SolidWebhookMapper {
54-
return new SolidWebhookMapper(
55-
$c->get(IDBConnection::class)
56-
);
57-
});
5838
}
5939

6040
public function register(IRegistrationContext $context): void {
6141
$context->registerWellKnownHandler(\OCA\Solid\WellKnown\OpenIdConfigurationHandler::class);
6242
$context->registerWellKnownHandler(\OCA\Solid\WellKnown\SolidHandler::class);
43+
$context->registerMiddleware(SolidCorsMiddleware::class);
6344

6445
/**
6546
* Core class wrappers
@@ -79,6 +60,19 @@ public function register(IRegistrationContext $context): void {
7960
$context->registerService('User', function($c) {
8061
return $c->query('UserSession')->getUser();
8162
});
63+
64+
/* webhook DB services */
65+
$context->registerService(SolidWebhookService::class, function($c): SolidWebhookService {
66+
return new SolidWebhookService(
67+
$c->query(SolidWebhookMapper::class)
68+
);
69+
});
70+
71+
$context->registerService(SolidWebhookMapper::class, function($c): SolidWebhookMapper {
72+
return new SolidWebhookMapper(
73+
$c->get(\OCP\IDBConnection::class)
74+
);
75+
});
8276
}
8377

8478
public function boot(IBootContext $context): void {

solid/lib/Controller/StorageController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ private function respond($response) {
439439
$policy->addAllowedFontDomain("*");
440440
$policy->addAllowedConnectDomain("*");
441441
$policy->allowInlineStyle(true);
442-
$policy->allowInlineScript(true);
442+
// $policy->allowInlineScript(true); - removed, this function no longer exists in NC28
443443
$policy->allowEvalScript(true);
444444
$result->setContentSecurityPolicy($policy);
445445

solid/templates/applauncher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
style('solid', 'style');
44
?>
55

6-
<div id="app-navigation">
6+
<div id="app-navigation" class="app-navigation-personal">
77
<?php print_unescaped($this->inc('navigation/index')); ?>
88
</div>
99

solid/templates/profile.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
style('solid', 'style');
44
?>
55

6-
<div id="app-navigation">
6+
<div id="app-navigation" class="app-navigation-personal">
77
<?php print_unescaped($this->inc('navigation/index')); ?>
88
</div>
99

0 commit comments

Comments
 (0)