Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pdsinterop/solid-nextcloud
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.7.1
Choose a base ref
...
head repository: pdsinterop/solid-nextcloud
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Showing with 1,426 additions and 1,077 deletions.
  1. +38 −14 .github/workflows/ci.yml
  2. +1 −1 .github/workflows/dependancy-security-check.yml
  3. +1 −1 .github/workflows/php-version-sniff.yml
  4. +2 −1 Dockerfile
  5. +2 −3 INSTALL.md
  6. +73 −34 README.md
  7. +149 −0 docs/deploy.md
  8. +1 −0 env-vars-server.list
  9. +4 −4 init-live.sh
  10. +3 −3 init.sh
  11. +8 −5 run-solid-test-suite.sh
  12. +0 −1 solid/README.md
  13. +5 −4 solid/appinfo/info.xml
  14. +5 −5 solid/composer.json
  15. +537 −593 solid/composer.lock
  16. +1 −4 solid/css/settings-admin.css
  17. +5 −0 solid/img/app-dark.svg
  18. +4 −55 solid/img/app.svg
  19. +4 −4 solid/js/launcher.js
  20. +15 −4 solid/js/settings-admin.js
  21. +38 −38 solid/js/vendor/solid/solid-auth-fetcher.bundle.js
  22. +17 −23 solid/lib/AppInfo/Application.php
  23. +185 −0 solid/lib/BaseServerConfig.php
  24. +42 −0 solid/lib/BearerFactoryTrait.php
  25. +13 −13 solid/lib/Controller/AppController.php
  26. +1 −1 solid/lib/Controller/ContactsController.php
  27. +1 −1 solid/lib/Controller/PageController.php
  28. +7 −5 solid/lib/Controller/ProfileController.php
  29. +53 −14 solid/lib/Controller/ServerController.php
  30. +2 −0 solid/lib/Controller/SolidWebsocketController.php
  31. +41 −6 solid/lib/Controller/StorageController.php
  32. +13 −6 solid/lib/Middleware/SolidCorsMiddleware.php
  33. +12 −5 solid/lib/Notifications/SolidNotifications.php
  34. +32 −0 solid/lib/Sections/SolidAdmin.php
  35. +9 −145 solid/lib/ServerConfig.php
  36. +0 −32 solid/lib/Settings.php
  37. +50 −0 solid/lib/Settings/SolidAdmin.php
  38. +6 −19 solid/lib/solid-app-list.json
  39. +21 −0 solid/templates/admin.php
  40. +6 −9 solid/templates/applauncher.php
  41. +6 −9 solid/templates/profile.php
  42. +13 −15 solid/templates/sharing.php
52 changes: 38 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -12,6 +12,8 @@ on:
- main
pull_request:
branches: [ main ]
# Allow manually triggering the workflow.
workflow_dispatch:

# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
@@ -20,23 +22,35 @@ concurrency:
cancel-in-progress: true

jobs:
# @TODO: Instead of building the docker image here, take a pre-build image and mount the code
# (only build when the Dockerfile changes)
# @TODO: Instead of building the docker image here, take a pre-build image and mount the code?
# (only build when the Dockerfile changes) Or only push when tagged/main?
build-docker-nextcloud:
runs-on: ubuntu-latest
strategy:
matrix:
# For the latest version information see: https://github.com/nextcloud/server/wiki/Maintenance-and-Release-Schedule

Check warning on line 31 in .github/workflows/ci.yml

GitHub Actions / lint-yaml

31:121 [line-length] line too long (123 > 120 characters)

Check warning on line 31 in .github/workflows/ci.yml

GitHub Actions / lint-yaml

31:121 [line-length] line too long (123 > 120 characters)
# Versions before 22 are not tested as they run on PHP versions lower than 8.0
# Versions before 24 are not tested as they do not support `.well-known` entries
# Version 24 comes with PHP 8.0, which is no longer supported;
# Latest is not tested here, as that could cause failures unrelated to project changes
nextcloud_version:
- 28
- 29
- 30

steps:
- name: Create docker tag from git reference
# A tag name may only contain lower- and uppercase letters, digits, underscores, periods and dashes.
run: |
echo "TAG=$(echo -n "${{ github.ref_name }}" \
echo "TAG=$(echo -n "${{ github.ref_name }}-${{ matrix.nextcloud_version }}" \
| tr --complement --squeeze-repeats '[:alnum:]._-' '_')" \
>> "${GITHUB_ENV}"
- uses: actions/cache@v3
id: cache-solid-nextcloud-docker
with:
path: cache/solid-nextcloud
key: solid-nextcloud-docker-${{ github.sha }}
key: solid-nextcloud-docker-${{ matrix.nextcloud_version }}-${{ github.sha }}

- uses: actions/checkout@v3

@@ -46,35 +60,44 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build Solid-Nextcloud Docker image
- name: Build Solid-Nextcloud Docker image from NC-${{ matrix.nextcloud_version }}
run: |
docker build \
--tag "solid-nextcloud:${{ env.TAG }}" \
--tag "ghcr.io/pdsinterop/solid-nextcloud:${{ env.TAG }}" \
--build-arg 'NEXTCLOUD_VERSION=${{ matrix.nextcloud_version }}' \
.
docker push "ghcr.io/pdsinterop/solid-nextcloud:${{ env.TAG }}"
mkdir -p cache/solid-nextcloud
docker image save solid-nextcloud:${{ env.TAG }} --output ./cache/solid-nextcloud/${{ github.sha }}.tar
docker image save solid-nextcloud:${{ env.TAG }} --output ./cache/solid-nextcloud/${{ github.sha }}-${{ matrix.nextcloud_version }}.tar

Check warning on line 72 in .github/workflows/ci.yml

GitHub Actions / lint-yaml

72:121 [line-length] line too long (145 > 120 characters)

Check warning on line 72 in .github/workflows/ci.yml

GitHub Actions / lint-yaml

72:121 [line-length] line too long (145 > 120 characters)
solid-testsuite:
timeout-minutes: 30
needs:
- build-docker-nextcloud

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
nextcloud_version:
- 28
- 29
- 30
test:
- 'solidtestsuite/solid-crud-tests:v7.0.5'
- 'solidtestsuite/web-access-control-tests:v7.1.0'
- 'solidtestsuite/webid-provider-tests:v2.1.0'

needs:
- build-docker-nextcloud
- 'solidtestsuite/webid-provider-tests:v2.1.1'

runs-on: ubuntu-latest
# Prevent EOL or non-stable versions of Nextcloud to fail the test-suite
continue-on-error: ${{ contains(fromJson('[28,29,30]'), matrix.nextcloud_version) == false }}

steps:
- name: Create docker tag from git reference
# A tag name may only contain lower- and uppercase letters, digits, underscores, periods and dashes.
run: |
echo "TAG=$(echo -n "${{ github.ref_name }}" \
echo "TAG=$(echo -n "${{ github.ref_name }}-${{ matrix.nextcloud_version }}" \
| tr --complement --squeeze-repeats '[:alnum:]._-' '_')" \
>> "${GITHUB_ENV}"
@@ -84,17 +107,18 @@ jobs:
id: cache-solid-nextcloud-docker
with:
path: cache/solid-nextcloud
key: solid-nextcloud-docker-${{ github.sha }}
key: solid-nextcloud-docker-${{ matrix.nextcloud_version }}-${{ github.sha }}

- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# FIXME: The `docker pull` should be moved to a previous step and cached
- name: Pull docker Images
run: |
docker image load --input ./cache/solid-nextcloud/${{ github.sha }}.tar
docker image load --input ./cache/solid-nextcloud/${{ github.sha }}-${{ matrix.nextcloud_version }}.tar
docker pull michielbdejong/nextcloud-cookie:${{ env.COOKIE_TAG }}
docker pull ${{ matrix.test }}
docker pull ghcr.io/pdsinterop/php-solid-pubsub-server:${{ env.PUBSUB_TAG }}
2 changes: 1 addition & 1 deletion .github/workflows/dependancy-security-check.yml
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ jobs:

strategy:
matrix:
php: ['8.0', '8.1']
php: ['8.2']

steps:
- name: Checkout code
2 changes: 1 addition & 1 deletion .github/workflows/php-version-sniff.yml
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ jobs:
php-codesniffer:
strategy:
matrix:
php: [ '8.0', '8.1' ]
php: [ '8.1' ]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM nextcloud:24.0.1
ARG NEXTCLOUD_VERSION
FROM nextcloud:${NEXTCLOUD_VERSION}

RUN apt-get update && apt-get install -yq \
git \
5 changes: 2 additions & 3 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# Installing this app to your Nextcloud

If you have installed Nextcloud [using snap](https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-nextcloud-on-ubuntu-22-04)
you should be able to run the latest version of this app.
you should be able to run the latest version of this app. You can find it in the Nextcloud app store as `Solid`, or by running `sudo nextcloud.occ app:install solid`.

## Building from source
In the future you will be able to install the app just from the app store, or by running `sudo nextcloud.occ app:install solid`.
But currently (September 2022) that still installs version 0.0.3, which means you need to install from source. To switch the version of your Solid app from the "store-bought" version to the latest unreleased version, you will need to build from source:
To switch the version of your Solid app from the "store-bought" version to the latest unreleased version, you will need to build from source:
```
sudo /bin/bash
cd /var/snap/nextcloud/current/nextcloud/extra-apps/
107 changes: 73 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,47 @@
# solid-nextcloud

[![Project stage: Production Ready][project-stage-badge: Production Ready]][project-stage-page]
[![License][license-shield]][license-link]
[![Latest Version][version-shield]][version-link]
![Maintained][maintained-shield]

[![PDS Interop][pdsinterop-shield]][pdsinterop-site]
[![standard-readme compliant][standard-readme-shield]][standard-readme-link]
[![keep-a-changelog compliant][keep-a-changelog-shield]][keep-a-changelog-link]

A plugin to make Nextcloud compatible with Solid.

<!-- toc -->

## Installation

You can download it via the Nextcloud app store: https://apps.nextcloud.com/apps/solid
IMPORTANT: Follow the [install instructions!](https://github.com/pdsinterop/solid-nextcloud/blob/main/INSTALL.md).

## Development install
### Manual install

Please follow the [install instructions](https://github.com/pdsinterop/solid-nextcloud/blob/main/INSTALL.md).

<!-- @TODO: ## Usage -->

## Contributing

Questions or feedback can be given by [opening an issue on GitHub][issues-link].

All PDS Interop projects are open source and community-friendly.
Any contribution is welcome!
For more details read the [contribution guidelines][contributing-link].

All PDS Interop projects adhere to [the Code Manifesto](http://codemanifesto.com)
as its [code-of-conduct][code-of-conduct]. Contributors are expected to abide by its terms.

There is [a list of all contributors on GitHub][contributors-page].

For a list of changes see the [CHANGELOG][changelog] or [the GitHub releases page][releases-page].

### Development

#### Development install

Clone https://github.com/pdsinterop/test-suites, cd into it, and run:
```sh
docker pull nextcloud
@@ -21,40 +58,42 @@ docker exec -u root -it server service apache2 reload
Now visit https://localhost and log in as alice / alice123.

## Manual install
Pleas follow the [install instructions](https://github.com/pdsinterop/solid-nextcloud/blob/main/INSTALL.md).

## Unattended testing
Please follow the [install instructions](https://github.com/pdsinterop/solid-nextcloud/blob/main/INSTALL.md).
### Testing

#### Unattended testing

There is a [GitHub Action](https://github.com/pdsinterop/solid-nextcloud/actions/workflows/ci.yml) that runs a [Docker-based test script](https://github.com/pdsinterop/solid-nextcloud/blob/585b968/.github/workflows/ci.yml#L29).

## Manual testing
#### Manual testing

You can try out the various Solid apps that show up in the Solid App GUI inside the Nextcloud GUI on first use.

# Publishing to the Nextcloud app store

* `git checkout main`
* `git pull`
* Tag v0.0.X in solid/appinfo/info.xml
* `git tag`
* `git tag v0.0.X`
* `git push --follow-tags`
* `git checkout publish`
* `git pull`
* `git merge main`
* `cd solid`
* `php ../composer.phar update`
* `php ../composer.phar install --no-dev --prefer-dist`
* `git commit -am"built"` (at least `vendor/composer/installed.php` will have changed)
* `git push`
* `cd ..`
* create a release on github from the tag you just pushed
* `tar -cf solid.tar solid/`
* `gzip solid.tar`
* `git checkout main`
* edit the release and upload `solid.tar.gz` as a binary attachment
* make sure transfer/solid.key and transfer/solid.crt exist
* `openssl dgst -sha512 -sign ./transfer/solid.key ./solid.tar.gz | openssl base64`
* visit https://apps.nextcloud.com/developer/apps/releases/new
* go into the developer tools browser console to change the `<a>` element around the form to a `<p>` element. This makes it possible to fill in values in this form without being redirected.
* fill in for instance `https://github.com/pdsinterop/solid-nextcloud/releases/download/v0.0.2/solid.tar.gz` and the base64 signature from the openssl command
* click 'uploaden'
* good luck!
### Build / Deploy

For publishing to the Nextcloud app store see [the deploy instructions](docs/deploy.md).

## License

All code created by PDS Interop is licensed under the [MIT License][license-link].

[changelog]: CHANGELOG.md
[code-of-conduct]: https://pdsinterop.org/code-of-conduct/
[contributing-link]: https://pdsinterop.org/contributing/
[contributors-page]: https://github.com/pdsinterop/solid-nextcloud/contributors
[issues-link]: https://github.com/pdsinterop/solid-nextcloud/issues
[releases-page]: https://github.com/pdsinterop/solid-nextcloud/releases
[keep-a-changelog-link]: https://keepachangelog.com/
[keep-a-changelog-shield]: https://img.shields.io/badge/Keep%20a%20Changelog-f15d30.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9IiNmZmYiIHZpZXdCb3g9IjAgMCAxODcgMTg1Ij48cGF0aCBkPSJNNjIgN2MtMTUgMy0yOCAxMC0zNyAyMmExMjIgMTIyIDAgMDAtMTggOTEgNzQgNzQgMCAwMDE2IDM4YzYgOSAxNCAxNSAyNCAxOGE4OSA4OSAwIDAwMjQgNCA0NSA0NSAwIDAwNiAwbDMtMSAxMy0xYTE1OCAxNTggMCAwMDU1LTE3IDYzIDYzIDAgMDAzNS01MiAzNCAzNCAwIDAwLTEtNWMtMy0xOC05LTMzLTE5LTQ3LTEyLTE3LTI0LTI4LTM4LTM3QTg1IDg1IDAgMDA2MiA3em0zMCA4YzIwIDQgMzggMTQgNTMgMzEgMTcgMTggMjYgMzcgMjkgNTh2MTJjLTMgMTctMTMgMzAtMjggMzhhMTU1IDE1NSAwIDAxLTUzIDE2bC0xMyAyaC0xYTUxIDUxIDAgMDEtMTItMWwtMTctMmMtMTMtNC0yMy0xMi0yOS0yNy01LTEyLTgtMjQtOC0zOWExMzMgMTMzIDAgMDE4LTUwYzUtMTMgMTEtMjYgMjYtMzMgMTQtNyAyOS05IDQ1LTV6TTQwIDQ1YTk0IDk0IDAgMDAtMTcgNTQgNzUgNzUgMCAwMDYgMzJjOCAxOSAyMiAzMSA0MiAzMiAyMSAyIDQxLTIgNjAtMTRhNjAgNjAgMCAwMDIxLTE5IDUzIDUzIDAgMDA5LTI5YzAtMTYtOC0zMy0yMy01MWE0NyA0NyAwIDAwLTUtNWMtMjMtMjAtNDUtMjYtNjctMTgtMTIgNC0yMCA5LTI2IDE4em0xMDggNzZhNTAgNTAgMCAwMS0yMSAyMmMtMTcgOS0zMiAxMy00OCAxMy0xMSAwLTIxLTMtMzAtOS01LTMtOS05LTEzLTE2YTgxIDgxIDAgMDEtNi0zMiA5NCA5NCAwIDAxOC0zNSA5MCA5MCAwIDAxNi0xMmwxLTJjNS05IDEzLTEzIDIzLTE2IDE2LTUgMzItMyA1MCA5IDEzIDggMjMgMjAgMzAgMzYgNyAxNSA3IDI5IDAgNDJ6bS00My03M2MtMTctOC0zMy02LTQ2IDUtMTAgOC0xNiAyMC0xOSAzN2E1NCA1NCAwIDAwNSAzNGM3IDE1IDIwIDIzIDM3IDIyIDIyLTEgMzgtOSA0OC0yNGE0MSA0MSAwIDAwOC0yNCA0MyA0MyAwIDAwLTEtMTJjLTYtMTgtMTYtMzEtMzItMzh6bS0yMyA5MWgtMWMtNyAwLTE0LTItMjEtN2EyNyAyNyAwIDAxLTEwLTEzIDU3IDU3IDAgMDEtNC0yMCA2MyA2MyAwIDAxNi0yNWM1LTEyIDEyLTE5IDI0LTIxIDktMyAxOC0yIDI3IDIgMTQgNiAyMyAxOCAyNyAzM3MtMiAzMS0xNiA0MGMtMTEgOC0yMSAxMS0zMiAxMXptMS0zNHYxNGgtOFY2OGg4djI4bDEwLTEwaDExbC0xNCAxNSAxNyAxOEg5NnoiLz48L3N2Zz4K
[license-link]: ./LICENSE
[license-shield]: https://img.shields.io/github/license/pdsinterop/solid-nextcloud.svg
[maintained-shield]: https://img.shields.io/maintenance/yes/2023.svg
[pdsinterop-shield]: https://img.shields.io/badge/-PDS%20Interop-7C4DFF.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9Ii01IC01IDExMCAxMTAiIGZpbGw9IiNGRkYiIHN0cm9rZS13aWR0aD0iMCI+CiAgICA8cGF0aCBkPSJNLTEgNTJoMTdhMzcuNSAzNC41IDAgMDAyNS41IDMxLjE1di0xMy43NWEyMC43NSAyMSAwIDAxOC41LTQwLjI1IDIwLjc1IDIxIDAgMDE4LjUgNDAuMjV2MTMuNzVhMzcgMzQuNSAwIDAwMjUuNS0zMS4xNWgxN2EyMiAyMS4xNSAwIDAxLTEwMiAweiIvPgogICAgPHBhdGggZD0iTSAxMDEgNDhhMi43NyAyLjY3IDAgMDAtMTAyIDBoIDE3YTIuOTcgMi44IDAgMDE2OCAweiIvPgo8L3N2Zz4K
[pdsinterop-site]: https://pdsinterop.org/
[project-stage-badge: Production Ready]: https://img.shields.io/badge/Project%20Stage-Production%20Ready-brightgreen.svg
[project-stage-page]: https://blog.pother.ca/project-stages/
[standard-readme-link]: https://github.com/RichardLitt/standard-readme
[standard-readme-shield]: https://img.shields.io/badge/-Standard%20Readme-brightgreen.svg
[version-link]: https://packagist.org/packages/pdsinterop/solid-nextcloud
[version-shield]: https://img.shields.io/github/v/release/pdsinterop/solid-nextcloud.svg?sort=semver
Loading