Compare commits

..

1 Commits

Author SHA1 Message Date
Carl Schwan d98b1fe67d fix: Run integration tests in debug mode
And ensure all headers are available in debug mode

Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-12-17 10:25:27 +01:00
3356 changed files with 75037 additions and 76995 deletions
+4 -4
View File
@@ -52,13 +52,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
@@ -81,13 +81,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
@@ -31,7 +31,7 @@ jobs:
- 'version.php'
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
@@ -27,7 +27,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
+3 -3
View File
@@ -32,18 +32,18 @@ jobs:
build-mode: none
steps:
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
- name: Initialize CodeQL
uses: github/codeql-action/init@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v4.31.10
uses: github/codeql-action/init@fdbfb4d2750291e159f0156def62b853c2798ca2 # v4.31.5
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
config-file: ./.github/codeql-config.yml
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v4.31.10
uses: github/codeql-action/analyze@fdbfb4d2750291e159f0156def62b853c2798ca2 # v4.31.5
with:
category: "/language:${{matrix.language}}"
+2 -2
View File
@@ -103,7 +103,7 @@ jobs:
key: git-repo
- name: Checkout ${{ needs.init.outputs.head_ref }}
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
# Needed to allow force push later
persist-credentials: true
@@ -124,7 +124,7 @@ jobs:
fallbackNpm: '^11.3'
- name: Set up node ${{ steps.package-engines-versions.outputs.nodeVersion }}
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ steps.package-engines-versions.outputs.nodeVersion }}
cache: npm
+1 -1
View File
@@ -38,7 +38,7 @@ jobs:
id: comment-branch
- name: Checkout ${{ steps.comment-branch.outputs.head_ref }}
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
fetch-depth: 0
+6 -6
View File
@@ -48,7 +48,7 @@ jobs:
exit 1
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
# We need to checkout submodules for 3rdparty
@@ -72,7 +72,7 @@ jobs:
fallbackNpm: '^11.3'
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}
@@ -160,7 +160,7 @@ jobs:
path: ./
- name: Set up node ${{ needs.init.outputs.nodeVersion }}
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ needs.init.outputs.nodeVersion }}
@@ -171,7 +171,7 @@ jobs:
run: ./node_modules/cypress/bin/cypress install
- name: Run ${{ matrix.containers == 'component' && 'component' || 'E2E' }} cypress tests
uses: cypress-io/github-action@2ad32e649e4db26c07674ebae31a297601dbcbaf # v6.10.8
uses: cypress-io/github-action@7ef72e250a9e564efb4ed4c2433971ada4cc38b4 # v6.10.4
with:
# We already installed the dependencies in the init job
install: false
@@ -195,7 +195,7 @@ jobs:
SETUP_TESTING: ${{ matrix.containers == 'setup' && 'true' || '' }}
- name: Upload snapshots and videos
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
if: always()
with:
name: snapshots_${{ matrix.containers }}
@@ -218,7 +218,7 @@ jobs:
run: docker exec nextcloud-e2e-test-server_${{ env.APP_NAME }} tar -cvjf - data > data.tar
- name: Upload data archive
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
if: failure() && matrix.containers != 'component'
with:
name: nc_data_${{ matrix.containers }}
+4 -4
View File
@@ -55,7 +55,7 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
@@ -71,7 +71,7 @@ jobs:
if [[ "${{ matrix.ftpd }}" == 'pure-ftpd' ]]; then docker run --name ftp -d --net host -e "PUBLICHOST=localhost" -e FTP_USER_NAME=test -e FTP_USER_PASS=test -e FTP_USER_HOME=/home/test -v /tmp/ftp:/home/test -v /tmp/ftp:/etc/pure-ftpd/passwd stilliard/pure-ftpd; fi
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -104,14 +104,14 @@ jobs:
- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./clover.xml
flags: phpunit-files-external-ftp
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
flags: phpunit-files-external-ftp
+8 -8
View File
@@ -64,13 +64,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -104,14 +104,14 @@ jobs:
- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./clover.xml
flags: phpunit-files-external-s3
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
flags: phpunit-files-external-s3
@@ -152,13 +152,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -185,14 +185,14 @@ jobs:
- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./clover.xml
flags: phpunit-files-external-s3
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
flags: phpunit-files-external-s3
+4 -4
View File
@@ -55,7 +55,7 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
@@ -67,7 +67,7 @@ jobs:
if [[ '${{ matrix.sftpd }}' == 'openssh' ]]; then docker run -p 2222:22 --name sftp -d -v /tmp/sftp:/home/test atmoz/sftp 'test:test:::data'; fi
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -93,14 +93,14 @@ jobs:
- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./clover.xml
flags: phpunit-files-external-sftp
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
flags: phpunit-files-external-sftp
@@ -46,13 +46,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Checkout user_saml
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
repository: nextcloud/user_saml
@@ -107,7 +107,7 @@ jobs:
echo "$FILEPATH:"
docker exec --user 33 apache cat $FILEPATH
smb-kerberos-sso-summary:
sftp-summary:
runs-on: ubuntu-latest-low
needs: [changes, files-external-smb-kerberos]
+5 -11
View File
@@ -53,25 +53,19 @@ jobs:
services:
samba:
image: ghcr.io/servercontainers/samba:smbd-only-a3.18.0-s4.18.2-r0
env:
ACCOUNT_test: test
UID_test: 1000
SAMBA_VOLUME_CONFIG_test: "[public]; path=/tmp; valid users = test; guest ok = no; read only = no; browseable = yes"
options: >-
--health-cmd=true
image: ghcr.io/nextcloud/continuous-integration-samba:latest # zizmor: ignore[unpinned-images]
ports:
- 445:445
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -105,14 +99,14 @@ jobs:
- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./clover.xml
flags: phpunit-files-external-smb
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
flags: phpunit-files-external-smb
+4 -4
View File
@@ -60,13 +60,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -97,14 +97,14 @@ jobs:
- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./clover.xml
flags: phpunit-files-external-webdav
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
flags: phpunit-files-external-webdav
+4 -4
View File
@@ -53,13 +53,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -85,14 +85,14 @@ jobs:
- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./clover.xml
flags: phpunit-files-external-generic
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
flags: phpunit-files-external-generic
@@ -24,14 +24,14 @@ jobs:
require: write
- name: Checkout github_helper
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
repository: nextcloud/github_helper
path: github_helper
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
path: server
@@ -73,7 +73,7 @@ jobs:
fi
- name: Set up php 8.2
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
with:
php-version: 8.2
coverage: none
+3 -3
View File
@@ -53,13 +53,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -70,7 +70,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Python
uses: LizardByte/actions/actions/setup_python@e6bc045033a5614035b66daafc38ff86faecb23a # v2026.116.208
uses: LizardByte/actions/actions/setup_python@329b1bcefe1cbe1ef289177471c9f2b2af98e6ca # v2025.1028.23217
with:
python-version: '2.7'
+2 -2
View File
@@ -52,13 +52,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
+2 -2
View File
@@ -67,13 +67,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
+4 -4
View File
@@ -97,14 +97,14 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Checkout Talk app
if: ${{ matrix.test-suite == 'videoverification_features' }}
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
repository: nextcloud/spreed
@@ -113,7 +113,7 @@ jobs:
- name: Checkout Activity app
if: ${{ matrix.test-suite == 'sharing_features' }}
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
repository: nextcloud/activity
@@ -121,7 +121,7 @@ jobs:
ref: ${{ matrix.activity-versions }}
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
+2 -2
View File
@@ -56,7 +56,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
@@ -68,7 +68,7 @@ jobs:
fallbackNpm: '^11.3'
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}
+2 -2
View File
@@ -48,12 +48,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
- name: Set up php
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
with:
php-version: 8.2
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
+3 -3
View File
@@ -47,18 +47,18 @@ jobs:
strategy:
matrix:
php-versions: [ '8.2', '8.3', '8.4', '8.5' ]
php-versions: [ '8.2', '8.3', '8.4' ]
name: php-lint
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
with:
php-version: ${{ matrix.php-versions }}
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
+2 -2
View File
@@ -25,7 +25,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
@@ -37,7 +37,7 @@ jobs:
fallbackNpm: '^11.3'
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}
+2 -2
View File
@@ -59,7 +59,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
@@ -71,7 +71,7 @@ jobs:
fallbackNpm: '^11.3'
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}
+3 -3
View File
@@ -58,7 +58,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
@@ -70,7 +70,7 @@ jobs:
fallbackNpm: '^11.3'
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}
@@ -90,7 +90,7 @@ jobs:
run: npm run test:coverage
- name: Collect coverage
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./coverage/lcov.info,./coverage/legacy/lcov.info
+2 -2
View File
@@ -56,7 +56,7 @@ jobs:
name: NPM build
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
@@ -68,7 +68,7 @@ jobs:
fallbackNpm: '^11.3'
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}
+3 -3
View File
@@ -34,7 +34,7 @@ jobs:
steps:
- name: Checkout
id: checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
ref: ${{ matrix.branches }}
@@ -48,7 +48,7 @@ jobs:
fallbackNpm: '^11.3'
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}
@@ -69,7 +69,7 @@ jobs:
- name: Create Pull Request
if: steps.checkout.outcome == 'success'
uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # v8.0.0
uses: peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412 # v7.0.9
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
commit-message: 'fix(deps): Fix npm audit'
+4 -4
View File
@@ -73,13 +73,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -110,14 +110,14 @@ jobs:
- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./clover.xml
flags: phpunit-azure
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
flags: phpunit-azure
+4 -4
View File
@@ -74,13 +74,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -116,14 +116,14 @@ jobs:
- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./clover.xml
flags: phpunit-s3
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
flags: phpunit-s3
+4 -4
View File
@@ -71,13 +71,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -106,14 +106,14 @@ jobs:
- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./clover.xml
flags: phpunit-swift
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
flags: phpunit-swift
+2 -2
View File
@@ -26,12 +26,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
- name: Set up php
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
with:
php-version: '8.2'
extensions: ctype, curl, dom, fileinfo, gd, json, libxml, mbstring, openssl, pcntl, pdo, posix, session, simplexml, xml, xmlreader, xmlwriter, zip, zlib
+3 -3
View File
@@ -35,14 +35,14 @@ jobs:
exit 1
- name: Checkout server before PR
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
ref: ${{ github.event.pull_request.base.ref }}
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
with:
php-version: ${{ matrix.php-versions }}
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, redis, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
@@ -98,7 +98,7 @@ jobs:
- name: Upload profiles
if: always()
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: profiles
path: |
+1 -1
View File
@@ -33,7 +33,7 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
+5 -7
View File
@@ -60,15 +60,13 @@ jobs:
fail-fast: false
matrix:
php-versions: ['8.2']
mariadb-versions: ['10.6', '10.11', '11.4', '11.8']
mariadb-versions: ['10.3', '10.6', '10.11', '11.4', '11.8']
include:
- php-versions: '8.3'
mariadb-versions: '10.11'
coverage: ${{ github.event_name != 'pull_request' }}
- php-versions: '8.4'
mariadb-versions: '11.8'
- php-versions: '8.5'
mariadb-versions: '11.8'
name: MariaDB ${{ matrix.mariadb-versions }} (PHP ${{ matrix.php-versions }}) - database tests
@@ -92,13 +90,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -131,14 +129,14 @@ jobs:
- name: Upload db code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./clover.db.xml
flags: phpunit-mariadb
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
flags: phpunit-mariadb
+5 -5
View File
@@ -56,7 +56,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-versions: ['8.3', '8.4', '8.5']
php-versions: ['8.3', '8.4']
include:
- php-versions: '8.2'
coverage: ${{ github.event_name != 'pull_request' }}
@@ -72,13 +72,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -103,14 +103,14 @@ jobs:
- name: Upload code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./clover.xml
flags: phpunit-memcached
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
flags: phpunit-memcached
+4 -4
View File
@@ -121,13 +121,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -161,14 +161,14 @@ jobs:
- name: Upload db code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./clover.db.xml
flags: phpunit-mysql
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
flags: phpunit-mysql
+4 -6
View File
@@ -67,8 +67,6 @@ jobs:
coverage: ${{ github.event_name != 'pull_request' }}
- mysql-versions: '8.4'
php-versions: '8.4'
- mysql-versions: '8.4'
php-versions: '8.5'
name: MySQL ${{ matrix.mysql-versions }} (PHP ${{ matrix.php-versions }}) - database tests
@@ -92,13 +90,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -131,14 +129,14 @@ jobs:
- name: Upload db code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./clover.db.xml
flags: phpunit-mysql
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
flags: phpunit-mysql
+5 -5
View File
@@ -59,7 +59,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-versions: ['8.3', '8.4', '8.5']
php-versions: ['8.3', '8.4']
include:
- php-versions: '8.2'
coverage: ${{ github.event_name != 'pull_request' }}
@@ -75,13 +75,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -109,14 +109,14 @@ jobs:
- name: Upload nodb code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./clover.nodb.xml
flags: phpunit-nodb
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
flags: phpunit-nodb
@@ -72,13 +72,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: ${{ matrix.php-versions }}
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, redis, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
+4 -6
View File
@@ -69,8 +69,6 @@ jobs:
php-versions: '8.3'
- oracle-versions: '23'
php-versions: '8.4'
- oracle-versions: '23'
php-versions: '8.5'
name: Oracle ${{ matrix.oracle-versions }} (PHP ${{ matrix.php-versions }}) - database tests
@@ -101,13 +99,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -133,14 +131,14 @@ jobs:
- name: Upload db code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./clover.db.xml
flags: phpunit-oci
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
flags: phpunit-oci
+4 -6
View File
@@ -68,8 +68,6 @@ jobs:
coverage: ${{ github.event_name != 'pull_request' }}
- php-versions: '8.4'
postgres-versions: '18'
- php-versions: '8.5'
postgres-versions: '18'
name: PostgreSQL ${{ matrix.postgres-versions }} (PHP ${{ matrix.php-versions }}) - database tests
@@ -92,13 +90,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -126,14 +124,14 @@ jobs:
- name: Upload db code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./clover.db.xml
flags: phpunit-postgres
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
flags: phpunit-postgres
+5 -5
View File
@@ -59,7 +59,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-versions: ['8.3', '8.4', '8.5']
php-versions: ['8.3', '8.4']
include:
- php-versions: '8.2'
coverage: ${{ github.event_name != 'pull_request' }}
@@ -75,13 +75,13 @@ jobs:
steps:
- name: Checkout server
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # v2.36.0
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
with:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
@@ -110,14 +110,14 @@ jobs:
- name: Upload db code coverage
if: ${{ !cancelled() && matrix.coverage }}
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
files: ./clover.db.xml
flags: phpunit-sqlite
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
flags: phpunit-sqlite
+1 -1
View File
@@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest-low
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
+1 -1
View File
@@ -20,7 +20,7 @@ jobs:
issues: write
steps:
- uses: actions/stale@997185467fa4f803885201cee163a9f38240193d # v9
- uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 # v9
with:
repo-token: ${{ secrets.COMMAND_BOT_PAT }}
stale-issue-message: >
+9 -10
View File
@@ -15,7 +15,6 @@ on:
permissions:
contents: read
security-events: write
concurrency:
group: static-code-analysis-${{ github.head_ref || github.run_id }}
@@ -29,13 +28,13 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
with:
persist-credentials: false
submodules: true
- name: Set up php
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: '8.2'
extensions: apcu,ctype,curl,dom,fileinfo,ftp,gd,imagick,intl,json,ldap,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
@@ -60,13 +59,13 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
with:
persist-credentials: false
submodules: true
- name: Set up php
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: '8.2'
extensions: ctype,curl,dom,fileinfo,ftp,gd,imagick,intl,json,ldap,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
@@ -84,7 +83,7 @@ jobs:
- name: Upload Security Analysis results to GitHub
if: always()
uses: github/codeql-action/upload-sarif@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v3
uses: github/codeql-action/upload-sarif@fdbfb4d2750291e159f0156def62b853c2798ca2 # v3
with:
sarif_file: results.sarif
@@ -95,13 +94,13 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
with:
persist-credentials: false
submodules: true
- name: Set up php
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: '8.2'
extensions: ctype,curl,dom,fileinfo,gd,imagick,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
@@ -126,13 +125,13 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
with:
persist-credentials: false
submodules: true
- name: Set up php
uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 #v2.36.0
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f #v2.35.5
with:
php-version: '8.2'
extensions: ctype,curl,dom,fileinfo,gd,imagick,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
+2 -2
View File
@@ -22,7 +22,7 @@ jobs:
name: update-ca-certificate-bundle-${{ matrix.branches }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
ref: ${{ matrix.branches }}
@@ -32,7 +32,7 @@ jobs:
run: curl --etag-compare build/ca-bundle-etag.txt --etag-save build/ca-bundle-etag.txt --output resources/config/ca-bundle.crt https://curl.se/ca/cacert.pem
- name: Create Pull Request
uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725
uses: peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
commit-message: 'fix(security): Update CA certificate bundle'
@@ -22,7 +22,7 @@ jobs:
name: update-code-signing-crl-${{ matrix.branches }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
ref: ${{ matrix.branches }}
@@ -35,7 +35,7 @@ jobs:
run: openssl crl -verify -in resources/codesigning/root.crl -CAfile resources/codesigning/root.crt -noout
- name: Create Pull Request
uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725
uses: peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
commit-message: 'fix(security): Update code signing revocation list'
@@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest-low
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
persist-credentials: false
submodules: true
@@ -107,7 +107,7 @@ jobs:
fi
- name: Create Pull Request
uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725
uses: peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412
if: steps.update-files.outputs.CHANGES_MADE == 'true'
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
-29
View File
@@ -1,29 +0,0 @@
# SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: AGPL-3.0-only
# Files removed at build time
# Global exclude
.editorconfig
.git
.git-blame-ignore-revs
.gitattributes
.github
.gitignore
.gitmodules
.idea
.l10nignore
.nextcloudignore
.noopenapi
.tx
cypress
tests
# Server specific
/.devcontainer
/__mocks__
/__tests__
/autotest*.sh
/build
/config/config.php
/contribute
/data
+1 -1
View File
@@ -11,7 +11,7 @@
**A safe home for all your data.**
![](https://raw.githubusercontent.com/nextcloud/screenshots/master/nextcloud-hub-25-files.png)
![](https://raw.githubusercontent.com/nextcloud/screenshots/master/nextcloud-hub-files-25-preview.png)
## Why is this so awesome? 🤩
@@ -18,7 +18,7 @@ class TagManagement extends Action {
$this->log('System tag "%s" (%s, %s) created',
[
'name' => $tag->getName(),
'visibility' => $tag->isUserVisible() ? 'visible' : 'invisible',
'visbility' => $tag->isUserVisible() ? 'visible' : 'invisible',
'assignable' => $tag->isUserAssignable() ? 'user assignable' : 'system only',
],
['name', 'visibility', 'assignable']
@@ -148,6 +148,18 @@ class SharingEventListener extends Action implements IEventListener {
'id',
]
),
IShare::TYPE_SCIENCEMESH => $this->log(
'The %s "%s" with ID "%s" has been shared to the sciencemesh user "%s" with permissions "%s" (Share ID: %s)',
$params,
[
'itemType',
'path',
'itemSource',
'shareWith',
'permissions',
'id',
]
),
default => null
};
}
@@ -262,6 +274,17 @@ class SharingEventListener extends Action implements IEventListener {
'id',
]
),
IShare::TYPE_SCIENCEMESH => $this->log(
'The %s "%s" with ID "%s" has been unshared from the sciencemesh user "%s" (Share ID: %s)',
$params,
[
'itemType',
'fileTarget',
'itemSource',
'shareWith',
'id',
]
),
default => null
};
}
+1 -10
View File
@@ -25,15 +25,6 @@ return [
'url' => '/invite-accepted',
'verb' => 'POST',
'root' => '/ocm',
],
// needs to be kept at the bottom of the list
[
'name' => 'OCMRequest#manageOCMRequests',
'url' => '/{ocmPath}',
'requirements' => ['ocmPath' => '.*'],
'verb' => ['GET', 'POST', 'PUT', 'DELETE'],
'root' => '/ocm',
],
]
],
];
@@ -10,7 +10,6 @@ return array(
'OCA\\CloudFederationAPI\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php',
'OCA\\CloudFederationAPI\\Capabilities' => $baseDir . '/../lib/Capabilities.php',
'OCA\\CloudFederationAPI\\Config' => $baseDir . '/../lib/Config.php',
'OCA\\CloudFederationAPI\\Controller\\OCMRequestController' => $baseDir . '/../lib/Controller/OCMRequestController.php',
'OCA\\CloudFederationAPI\\Controller\\RequestHandlerController' => $baseDir . '/../lib/Controller/RequestHandlerController.php',
'OCA\\CloudFederationAPI\\Db\\FederatedInvite' => $baseDir . '/../lib/Db/FederatedInvite.php',
'OCA\\CloudFederationAPI\\Db\\FederatedInviteMapper' => $baseDir . '/../lib/Db/FederatedInviteMapper.php',
@@ -25,7 +25,6 @@ class ComposerStaticInitCloudFederationAPI
'OCA\\CloudFederationAPI\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php',
'OCA\\CloudFederationAPI\\Capabilities' => __DIR__ . '/..' . '/../lib/Capabilities.php',
'OCA\\CloudFederationAPI\\Config' => __DIR__ . '/..' . '/../lib/Config.php',
'OCA\\CloudFederationAPI\\Controller\\OCMRequestController' => __DIR__ . '/..' . '/../lib/Controller/OCMRequestController.php',
'OCA\\CloudFederationAPI\\Controller\\RequestHandlerController' => __DIR__ . '/..' . '/../lib/Controller/RequestHandlerController.php',
'OCA\\CloudFederationAPI\\Db\\FederatedInvite' => __DIR__ . '/..' . '/../lib/Db/FederatedInvite.php',
'OCA\\CloudFederationAPI\\Db\\FederatedInviteMapper' => __DIR__ . '/..' . '/../lib/Db/FederatedInviteMapper.php',
-8
View File
@@ -1,8 +0,0 @@
OC.L10N.register(
"cloud_federation_api",
{
"Cloud Federation API" : "API Federasi Cloud",
"Enable clouds to communicate with each other and exchange data" : "Memungkinkan cloud untuk saling berkomunikasi dan bertukar data",
"The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "API Federasi Cloud memungkinkan berbagai instans Nextcloud untuk saling berkomunikasi dan bertukar data."
},
"nplurals=1; plural=0;");
-6
View File
@@ -1,6 +0,0 @@
{ "translations": {
"Cloud Federation API" : "API Federasi Cloud",
"Enable clouds to communicate with each other and exchange data" : "Memungkinkan cloud untuk saling berkomunikasi dan bertukar data",
"The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data." : "API Federasi Cloud memungkinkan berbagai instans Nextcloud untuk saling berkomunikasi dan bertukar data."
},"pluralForm" :"nplurals=1; plural=0;"
}
@@ -1,87 +0,0 @@
<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\CloudFederationAPI\Controller;
use JsonException;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\BruteForceProtection;
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
use OCP\AppFramework\Http\Attribute\PublicPage;
use OCP\AppFramework\Http\JSONResponse;
use OCP\AppFramework\Http\Response;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\IRequest;
use OCP\OCM\Events\OCMEndpointRequestEvent;
use OCP\OCM\Exceptions\OCMArgumentException;
use OCP\OCM\IOCMDiscoveryService;
use OCP\Security\Signature\Exceptions\IncomingRequestException;
use Psr\Log\LoggerInterface;
class OCMRequestController extends Controller {
public function __construct(
string $appName,
IRequest $request,
private readonly IEventDispatcher $eventDispatcher,
private readonly IOCMDiscoveryService $ocmDiscoveryService,
private readonly LoggerInterface $logger,
) {
parent::__construct($appName, $request);
}
/**
* Method will catch any request done to /ocm/[...] and will broadcast an event.
* The first parameter of the remaining subpath (post-/ocm/) is defined as
* capability and should be used by listeners to filter incoming requests.
*
* @see OCMEndpointRequestEvent
* @see OCMEndpointRequestEvent::getArgs
*
* @param string $ocmPath
* @return Response
* @throws OCMArgumentException
*/
#[NoCSRFRequired]
#[PublicPage]
#[BruteForceProtection(action: 'receiveOcmRequest')]
public function manageOCMRequests(string $ocmPath): Response {
if (!mb_check_encoding($ocmPath, 'UTF-8')) {
throw new OCMArgumentException('path is not UTF-8');
}
try {
// if request is signed and well signed, no exceptions are thrown
// if request is not signed and host is known for not supporting signed request, no exceptions are thrown
$signedRequest = $this->ocmDiscoveryService->getIncomingSignedRequest();
} catch (IncomingRequestException $e) {
$this->logger->warning('incoming ocm request exception', ['exception' => $e]);
return new JSONResponse(['message' => $e->getMessage(), 'validationErrors' => []], Http::STATUS_BAD_REQUEST);
}
// assuming that ocm request contains a json array
$payload = $signedRequest?->getBody() ?? file_get_contents('php://input');
try {
$payload = ($payload) ? json_decode($payload, true, 512, JSON_THROW_ON_ERROR) : null;
} catch (JsonException $e) {
$this->logger->debug('json decode error', ['exception' => $e]);
$payload = null;
}
$event = new OCMEndpointRequestEvent(
$this->request->getMethod(),
preg_replace('@/+@', '/', $ocmPath),
$payload,
$signedRequest?->getOrigin()
);
$this->eventDispatcher->dispatchTyped($event);
return $event->getResponse() ?? new Response(Http::STATUS_NOT_FOUND);
}
}
@@ -7,6 +7,14 @@
namespace OCA\CloudFederationAPI\Controller;
use NCU\Federation\ISignedCloudFederationProvider;
use NCU\Security\Signature\Exceptions\IdentityNotFoundException;
use NCU\Security\Signature\Exceptions\IncomingRequestException;
use NCU\Security\Signature\Exceptions\SignatoryNotFoundException;
use NCU\Security\Signature\Exceptions\SignatureException;
use NCU\Security\Signature\Exceptions\SignatureNotFoundException;
use NCU\Security\Signature\IIncomingSignedRequest;
use NCU\Security\Signature\ISignatureManager;
use OC\OCM\OCMSignatoryManager;
use OCA\CloudFederationAPI\Config;
use OCA\CloudFederationAPI\Db\FederatedInviteMapper;
@@ -31,18 +39,11 @@ use OCP\Federation\Exceptions\ProviderDoesNotExistsException;
use OCP\Federation\ICloudFederationFactory;
use OCP\Federation\ICloudFederationProviderManager;
use OCP\Federation\ICloudIdManager;
use OCP\Federation\ISignedCloudFederationProvider;
use OCP\IAppConfig;
use OCP\IGroupManager;
use OCP\IRequest;
use OCP\IURLGenerator;
use OCP\IUserManager;
use OCP\OCM\IOCMDiscoveryService;
use OCP\Security\Signature\Exceptions\IdentityNotFoundException;
use OCP\Security\Signature\Exceptions\IncomingRequestException;
use OCP\Security\Signature\Exceptions\SignatoryNotFoundException;
use OCP\Security\Signature\IIncomingSignedRequest;
use OCP\Security\Signature\ISignatureManager;
use OCP\Share\Exceptions\ShareNotFound;
use OCP\Util;
use Psr\Log\LoggerInterface;
@@ -73,8 +74,8 @@ class RequestHandlerController extends Controller {
private readonly IAppConfig $appConfig,
private ICloudFederationFactory $factory,
private ICloudIdManager $cloudIdManager,
private readonly IOCMDiscoveryService $ocmDiscoveryService,
private readonly ISignatureManager $signatureManager,
private readonly OCMSignatoryManager $signatoryManager,
private ITimeFactory $timeFactory,
) {
parent::__construct($appName, $request);
@@ -105,16 +106,14 @@ class RequestHandlerController extends Controller {
#[NoCSRFRequired]
#[BruteForceProtection(action: 'receiveFederatedShare')]
public function addShare($shareWith, $name, $description, $providerId, $owner, $ownerDisplayName, $sharedBy, $sharedByDisplayName, $protocol, $shareType, $resourceType) {
if (!$this->appConfig->getValueBool('core', OCMSignatoryManager::APPCONFIG_SIGN_DISABLED, lazy: true)) {
try {
// if request is signed and well signed, no exceptions are thrown
// if request is not signed and host is known for not supporting signed request, no exception are thrown
$signedRequest = $this->ocmDiscoveryService->getIncomingSignedRequest();
$this->confirmSignedOrigin($signedRequest, 'owner', $owner);
} catch (IncomingRequestException $e) {
$this->logger->warning('incoming request exception', ['exception' => $e]);
return new JSONResponse(['message' => $e->getMessage(), 'validationErrors' => []], Http::STATUS_BAD_REQUEST);
}
try {
// if request is signed and well signed, no exception are thrown
// if request is not signed and host is known for not supporting signed request, no exception are thrown
$signedRequest = $this->getSignedRequest();
$this->confirmSignedOrigin($signedRequest, 'owner', $owner);
} catch (IncomingRequestException $e) {
$this->logger->warning('incoming request exception', ['exception' => $e]);
return new JSONResponse(['message' => $e->getMessage(), 'validationErrors' => []], Http::STATUS_BAD_REQUEST);
}
// check if all required parameters are set
@@ -355,16 +354,14 @@ class RequestHandlerController extends Controller {
);
}
if (!$this->appConfig->getValueBool('core', OCMSignatoryManager::APPCONFIG_SIGN_DISABLED, lazy: true)) {
try {
// if request is signed and well signed, no exception are thrown
// if request is not signed and host is known for not supporting signed request, no exception are thrown
$signedRequest = $this->ocmDiscoveryService->getIncomingSignedRequest();
$this->confirmNotificationIdentity($signedRequest, $resourceType, $notification);
} catch (IncomingRequestException $e) {
$this->logger->warning('incoming request exception', ['exception' => $e]);
return new JSONResponse(['message' => $e->getMessage(), 'validationErrors' => []], Http::STATUS_BAD_REQUEST);
}
try {
// if request is signed and well signed, no exception are thrown
// if request is not signed and host is known for not supporting signed request, no exception are thrown
$signedRequest = $this->getSignedRequest();
$this->confirmNotificationIdentity($signedRequest, $resourceType, $notification);
} catch (IncomingRequestException $e) {
$this->logger->warning('incoming request exception', ['exception' => $e]);
return new JSONResponse(['message' => $e->getMessage(), 'validationErrors' => []], Http::STATUS_BAD_REQUEST);
}
try {
@@ -433,6 +430,37 @@ class RequestHandlerController extends Controller {
}
/**
* returns signed request if available.
* throw an exception:
* - if request is signed, but wrongly signed
* - if request is not signed but instance is configured to only accept signed ocm request
*
* @return IIncomingSignedRequest|null null if remote does not (and never did) support signed request
* @throws IncomingRequestException
*/
private function getSignedRequest(): ?IIncomingSignedRequest {
try {
$signedRequest = $this->signatureManager->getIncomingSignedRequest($this->signatoryManager);
$this->logger->debug('signed request available', ['signedRequest' => $signedRequest]);
return $signedRequest;
} catch (SignatureNotFoundException|SignatoryNotFoundException $e) {
$this->logger->debug('remote does not support signed request', ['exception' => $e]);
// remote does not support signed request.
// currently we still accept unsigned request until lazy appconfig
// core.enforce_signed_ocm_request is set to true (default: false)
if ($this->appConfig->getValueBool('core', OCMSignatoryManager::APPCONFIG_SIGN_ENFORCED, lazy: true)) {
$this->logger->notice('ignored unsigned request', ['exception' => $e]);
throw new IncomingRequestException('Unsigned request');
}
} catch (SignatureException $e) {
$this->logger->warning('wrongly signed request', ['exception' => $e]);
throw new IncomingRequestException('Invalid signature');
}
return null;
}
/**
* confirm that the value related to $key entry from the payload is in format userid@hostname
* and compare hostname with the origin of the signed request.
@@ -472,6 +500,7 @@ class RequestHandlerController extends Controller {
*
* @param IIncomingSignedRequest|null $signedRequest
* @param string $resourceType
* @param string $sharedSecret
*
* @throws IncomingRequestException
* @throws BadRequestException
@@ -495,7 +524,7 @@ class RequestHandlerController extends Controller {
return;
}
} catch (\Exception $e) {
throw new IncomingRequestException($e->getMessage(), previous: $e);
throw new IncomingRequestException($e->getMessage());
}
$this->confirmNotificationEntry($signedRequest, $identity);
@@ -9,6 +9,8 @@ declare(strict_types=1);
namespace OCA\CloudFederationApi\Tests;
use NCU\Security\Signature\ISignatureManager;
use OC\OCM\OCMSignatoryManager;
use OCA\CloudFederationAPI\Config;
use OCA\CloudFederationAPI\Controller\RequestHandlerController;
use OCA\CloudFederationAPI\Db\FederatedInvite;
@@ -27,8 +29,6 @@ use OCP\IRequest;
use OCP\IURLGenerator;
use OCP\IUser;
use OCP\IUserManager;
use OCP\OCM\IOCMDiscoveryService;
use OCP\Security\Signature\ISignatureManager;
use PHPUnit\Framework\MockObject\MockObject;
use Psr\Log\LoggerInterface;
use Test\TestCase;
@@ -45,11 +45,10 @@ class RequestHandlerControllerTest extends TestCase {
private FederatedInviteMapper&MockObject $federatedInviteMapper;
private AddressHandler&MockObject $addressHandler;
private IAppConfig&MockObject $appConfig;
private ICloudFederationFactory&MockObject $cloudFederationFactory;
private ICloudIdManager&MockObject $cloudIdManager;
private IOCMDiscoveryService&MockObject $discoveryService;
private ISignatureManager&MockObject $signatureManager;
private OCMSignatoryManager&MockObject $signatoryManager;
private ITimeFactory&MockObject $timeFactory;
private RequestHandlerController $requestHandlerController;
@@ -70,8 +69,8 @@ class RequestHandlerControllerTest extends TestCase {
$this->appConfig = $this->createMock(IAppConfig::class);
$this->cloudFederationFactory = $this->createMock(ICloudFederationFactory::class);
$this->cloudIdManager = $this->createMock(ICloudIdManager::class);
$this->discoveryService = $this->createMock(IOCMDiscoveryService::class);
$this->signatureManager = $this->createMock(ISignatureManager::class);
$this->signatoryManager = $this->createMock(OCMSignatoryManager::class);
$this->timeFactory = $this->createMock(ITimeFactory::class);
$this->requestHandlerController = new RequestHandlerController(
@@ -89,8 +88,8 @@ class RequestHandlerControllerTest extends TestCase {
$this->appConfig,
$this->cloudFederationFactory,
$this->cloudIdManager,
$this->discoveryService,
$this->signatureManager,
$this->signatoryManager,
$this->timeFactory,
);
}
-4
View File
@@ -38,10 +38,6 @@
</providers>
</activity>
<openmetrics>
<exporter>OCA\Comments\OpenMetrics\CommentsCountMetric</exporter>
</openmetrics>
<collaboration>
<plugins>
<plugin type="autocomplete-sort">OCA\Comments\Collaboration\CommentersSorter</plugin>
@@ -22,6 +22,5 @@ return array(
'OCA\\Comments\\MaxAutoCompleteResultsInitialState' => $baseDir . '/../lib/MaxAutoCompleteResultsInitialState.php',
'OCA\\Comments\\Notification\\Listener' => $baseDir . '/../lib/Notification/Listener.php',
'OCA\\Comments\\Notification\\Notifier' => $baseDir . '/../lib/Notification/Notifier.php',
'OCA\\Comments\\OpenMetrics\\CommentsCountMetric' => $baseDir . '/../lib/OpenMetrics/CommentsCountMetric.php',
'OCA\\Comments\\Search\\CommentsSearchProvider' => $baseDir . '/../lib/Search/CommentsSearchProvider.php',
);
@@ -37,7 +37,6 @@ class ComposerStaticInitComments
'OCA\\Comments\\MaxAutoCompleteResultsInitialState' => __DIR__ . '/..' . '/../lib/MaxAutoCompleteResultsInitialState.php',
'OCA\\Comments\\Notification\\Listener' => __DIR__ . '/..' . '/../lib/Notification/Listener.php',
'OCA\\Comments\\Notification\\Notifier' => __DIR__ . '/..' . '/../lib/Notification/Notifier.php',
'OCA\\Comments\\OpenMetrics\\CommentsCountMetric' => __DIR__ . '/..' . '/../lib/OpenMetrics/CommentsCountMetric.php',
'OCA\\Comments\\Search\\CommentsSearchProvider' => __DIR__ . '/..' . '/../lib/Search/CommentsSearchProvider.php',
);
-1
View File
@@ -17,7 +17,6 @@ OC.L10N.register(
"Delete comment" : "Ezabatu iruzkina",
"Cancel edit" : "Utzi editatzeari",
"New comment" : "Iruzkin berria",
"Write a comment …" : "Idatzi iruzkin bat …",
"Post comment" : "Argitaratu iruzkina",
"@ for mentions, : for emoji, / for smart picker" : "@ aipamenetarako, : emojientzako, / hautatzaile adimentsurako",
"Could not reload comments" : "Ezin izan dira iruzkinak freskatu",
-1
View File
@@ -15,7 +15,6 @@
"Delete comment" : "Ezabatu iruzkina",
"Cancel edit" : "Utzi editatzeari",
"New comment" : "Iruzkin berria",
"Write a comment …" : "Idatzi iruzkin bat …",
"Post comment" : "Argitaratu iruzkina",
"@ for mentions, : for emoji, / for smart picker" : "@ aipamenetarako, : emojientzako, / hautatzaile adimentsurako",
"Could not reload comments" : "Ezin izan dira iruzkinak freskatu",
+3 -12
View File
@@ -5,33 +5,24 @@ OC.L10N.register(
"You commented" : "Anda berkomentar",
"{author} commented" : "{author} berkomentar",
"You commented on %1$s" : "Anda berkomentar pada %1$s",
"You commented on {file}" : "Anda berkomentar pada {file}",
"You commented on {file}" : "Anda berkomentar pada {file} ",
"%1$s commented on %2$s" : "%1$s dikomentari pada %2$s",
"{author} commented on {file}" : "{author} berkomentar pada {file}",
"<strong>Comments</strong> for files" : "<strong>komentar</strong> pada file",
"Files" : "File",
"You were mentioned on \"{file}\", in a comment by an account that has since been deleted" : "Anda disebutkan pada \"{file}\", dalam sebuah komentar oleh akun yang sejak itu telah dihapus",
"{user} mentioned you in a comment on \"{file}\"" : "{user} menyebut Anda dalam sebuah komentar pada \"{file}\"",
"{user} mentioned you in a comment on \"{file}\"" : "{user} menyebut Anda dalam sebuah komentar pada \"{file}\" ",
"Files app plugin to add comments to files" : "Plugin aplikasi file untuk menambah komentar pada file",
"Edit comment" : "Sunting komentar",
"Delete comment" : "Hapus komentar",
"Cancel edit" : "Batal sunting",
"New comment" : "Komentar baru",
"Write a comment …" : "Tulis komentar …",
"Post comment" : "Posting komentar",
"@ for mentions, : for emoji, / for smart picker" : "@ untuk penyebutan, : untuk emoji, / untuk pemilih cerdas",
"Could not reload comments" : "Tidak dapat memuat ulang komentar",
"Failed to mark comments as read" : "Gagal menandai komentar sebagai sudah dibaca",
"Unable to load the comments list" : "Tidak dapat memuat daftar komentar",
"No comments yet, start the conversation!" : "Belum ada yang berkomentar, mulailah perbincangan!",
"No more messages" : "Tidak ada pesan lagi",
"Retry" : "Ulangi",
"_1 new comment_::_{unread} new comments_" : ["{unread} komentar baru"],
"Comment" : "Komentar",
"An error occurred while trying to edit the comment" : "Terjadi kesalahan ketika mencoba menyunting komentar",
"Comment deleted" : "Komentar dihapus",
"An error occurred while trying to delete the comment" : "Terjadi kesalahan ketika mencoba untuk menghapus komentar",
"An error occurred while trying to create the comment" : "Terjadi kesalahan ketika mencoba untuk membuat komentar",
"Write a comment …" : "Tulis komentar …"
"An error occurred while trying to create the comment" : "Terjadi kesalahan ketika mencoba untuk membuat komentar"
},
"nplurals=1; plural=0;");
+3 -12
View File
@@ -3,33 +3,24 @@
"You commented" : "Anda berkomentar",
"{author} commented" : "{author} berkomentar",
"You commented on %1$s" : "Anda berkomentar pada %1$s",
"You commented on {file}" : "Anda berkomentar pada {file}",
"You commented on {file}" : "Anda berkomentar pada {file} ",
"%1$s commented on %2$s" : "%1$s dikomentari pada %2$s",
"{author} commented on {file}" : "{author} berkomentar pada {file}",
"<strong>Comments</strong> for files" : "<strong>komentar</strong> pada file",
"Files" : "File",
"You were mentioned on \"{file}\", in a comment by an account that has since been deleted" : "Anda disebutkan pada \"{file}\", dalam sebuah komentar oleh akun yang sejak itu telah dihapus",
"{user} mentioned you in a comment on \"{file}\"" : "{user} menyebut Anda dalam sebuah komentar pada \"{file}\"",
"{user} mentioned you in a comment on \"{file}\"" : "{user} menyebut Anda dalam sebuah komentar pada \"{file}\" ",
"Files app plugin to add comments to files" : "Plugin aplikasi file untuk menambah komentar pada file",
"Edit comment" : "Sunting komentar",
"Delete comment" : "Hapus komentar",
"Cancel edit" : "Batal sunting",
"New comment" : "Komentar baru",
"Write a comment …" : "Tulis komentar …",
"Post comment" : "Posting komentar",
"@ for mentions, : for emoji, / for smart picker" : "@ untuk penyebutan, : untuk emoji, / untuk pemilih cerdas",
"Could not reload comments" : "Tidak dapat memuat ulang komentar",
"Failed to mark comments as read" : "Gagal menandai komentar sebagai sudah dibaca",
"Unable to load the comments list" : "Tidak dapat memuat daftar komentar",
"No comments yet, start the conversation!" : "Belum ada yang berkomentar, mulailah perbincangan!",
"No more messages" : "Tidak ada pesan lagi",
"Retry" : "Ulangi",
"_1 new comment_::_{unread} new comments_" : ["{unread} komentar baru"],
"Comment" : "Komentar",
"An error occurred while trying to edit the comment" : "Terjadi kesalahan ketika mencoba menyunting komentar",
"Comment deleted" : "Komentar dihapus",
"An error occurred while trying to delete the comment" : "Terjadi kesalahan ketika mencoba untuk menghapus komentar",
"An error occurred while trying to create the comment" : "Terjadi kesalahan ketika mencoba untuk membuat komentar",
"Write a comment …" : "Tulis komentar …"
"An error occurred while trying to create the comment" : "Terjadi kesalahan ketika mencoba untuk membuat komentar"
},"pluralForm" :"nplurals=1; plural=0;"
}
-1
View File
@@ -17,7 +17,6 @@ OC.L10N.register(
"Delete comment" : "Reactie verwijderen",
"Cancel edit" : "Bewerking annuleren",
"New comment" : "Nieuwe reactie",
"Write a comment …" : "Schrijf een commentaar …",
"Post comment" : "Reactie plaatsen",
"@ for mentions, : for emoji, / for smart picker" : "@ voor vermeldingen, : voor emoji, / voor Smart Picker",
"Could not reload comments" : "Kon reactie niet opnieuw laden",
-1
View File
@@ -15,7 +15,6 @@
"Delete comment" : "Reactie verwijderen",
"Cancel edit" : "Bewerking annuleren",
"New comment" : "Nieuwe reactie",
"Write a comment …" : "Schrijf een commentaar …",
"Post comment" : "Reactie plaatsen",
"@ for mentions, : for emoji, / for smart picker" : "@ voor vermeldingen, : voor emoji, / voor Smart Picker",
"Could not reload comments" : "Kon reactie niet opnieuw laden",
@@ -1,52 +0,0 @@
<?php
/**
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\Comments\OpenMetrics;
use Generator;
use OCP\IDBConnection;
use OCP\OpenMetrics\IMetricFamily;
use OCP\OpenMetrics\Metric;
use OCP\OpenMetrics\MetricType;
use Override;
class CommentsCountMetric implements IMetricFamily {
public function __construct(
private IDBConnection $connection,
) {
}
#[Override]
public function name(): string {
return 'comments';
}
#[Override]
public function type(): MetricType {
return MetricType::gauge;
}
#[Override]
public function unit(): string {
return 'comments';
}
#[Override]
public function help(): string {
return 'Number of comments';
}
#[Override]
public function metrics(): Generator {
$qb = $this->connection->getQueryBuilder();
$result = $qb->select($qb->func()->count())
->from('comments')
->where($qb->expr()->eq('verb', $qb->expr()->literal('comment')))
->executeQuery();
yield new Metric($result->fetchOne(), [], time());
}
}
@@ -180,12 +180,14 @@ describe('Inline unread comments action enabled tests', () => {
describe('Inline unread comments action execute tests', () => {
test('Action opens sidebar', async () => {
const openMock = vi.fn()
const setActiveTabMock = vi.fn()
window.OCA = {
Files: {
// @ts-expect-error Mocking for testing
_sidebar: () => ({
Sidebar: {
open: openMock,
}),
setActiveTab: setActiveTabMock,
},
},
}
@@ -209,19 +211,22 @@ describe('Inline unread comments action execute tests', () => {
})
expect(result).toBe(null)
expect(openMock).toBeCalledWith(file, 'comments')
expect(setActiveTabMock).toBeCalledWith('comments')
expect(openMock).toBeCalledWith('/foobar.txt')
})
test('Action handles sidebar open failure', async () => {
const openMock = vi.fn(() => {
throw new Error('Mock error')
})
const setActiveTabMock = vi.fn()
window.OCA = {
Files: {
// @ts-expect-error Mocking for testing
_sidebar: () => ({
Sidebar: {
open: openMock,
}),
setActiveTab: setActiveTabMock,
},
},
}
vi.spyOn(logger, 'error').mockImplementation(() => vi.fn())
@@ -246,7 +251,8 @@ describe('Inline unread comments action execute tests', () => {
})
expect(result).toBe(false)
expect(openMock).toBeCalledWith(file, 'comments')
expect(setActiveTabMock).toBeCalledWith('comments')
expect(openMock).toBeCalledWith('/foobar.txt')
expect(logger.error).toBeCalledTimes(1)
})
})
@@ -1,10 +1,9 @@
/*!
/**
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import CommentProcessingSvg from '@mdi/svg/svg/comment-processing.svg?raw'
import { FileAction, getSidebar } from '@nextcloud/files'
import { FileAction } from '@nextcloud/files'
import { n, t } from '@nextcloud/l10n'
import logger from '../logger.js'
@@ -35,8 +34,8 @@ export const action = new FileAction({
}
try {
const sidebar = getSidebar()
sidebar.open(nodes[0], 'comments')
window.OCA.Files.Sidebar.setActiveTab('comments')
await window.OCA.Files.Sidebar.open(nodes[0].path)
return null
} catch (error) {
logger.error('Error while opening sidebar', { error })
+8 -16
View File
@@ -1,10 +1,8 @@
/*!
/**
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import type { INode } from '@nextcloud/files'
import moment from '@nextcloud/moment'
import { createPinia, PiniaVuePlugin } from 'pinia'
import Vue, { type ComponentPublicInstance } from 'vue'
@@ -21,7 +19,7 @@ let ActivityTabPluginInstance
*/
export function registerCommentsPlugins() {
window.OCA.Activity.registerSidebarAction({
mount: async (el: HTMLElement, { node, reload }: { node: INode, reload: () => void }) => {
mount: async (el, { fileInfo, reload }) => {
const pinia = createPinia()
if (!ActivityTabPluginView) {
@@ -34,10 +32,10 @@ export function registerCommentsPlugins() {
pinia,
propsData: {
reloadCallback: reload,
resourceId: node.fileid,
resourceId: fileInfo.id,
},
})
logger.info('Comments plugin mounted in Activity sidebar action', { node })
logger.info('Comments plugin mounted in Activity sidebar action', { fileInfo })
},
unmount: () => {
// destroy previous instance if available
@@ -47,15 +45,9 @@ export function registerCommentsPlugins() {
},
})
window.OCA.Activity.registerSidebarEntries(async ({ node, limit, offset }: { node: INode, limit?: number, offset?: number }) => {
const { data: comments } = await getComments(
{ resourceType: 'files', resourceId: node.fileid },
{
limit,
offset: offset ?? 0,
},
)
logger.debug('Loaded comments', { node, comments })
window.OCA.Activity.registerSidebarEntries(async ({ fileInfo, limit, offset }) => {
const { data: comments } = await getComments({ resourceType: 'files', resourceId: fileInfo.id }, { limit, offset })
logger.debug('Loaded comments', { fileInfo, comments })
const { default: CommentView } = await import('./views/ActivityCommentEntry.vue')
// @ts-expect-error Types are broken for Vue2
const CommentsViewObject = Vue.extend(CommentView)
@@ -70,7 +62,7 @@ export function registerCommentsPlugins() {
el: element,
propsData: {
comment,
resourceId: node.fileid,
resourceId: fileInfo.id,
reloadCallback: reload,
},
})
+59
View File
@@ -0,0 +1,59 @@
/**
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import MessageReplyText from '@mdi/svg/svg/message-reply-text.svg?raw'
import { getCSPNonce } from '@nextcloud/auth'
import { loadState } from '@nextcloud/initial-state'
import { registerCommentsPlugins } from './comments-activity-tab.ts'
// @ts-expect-error __webpack_nonce__ is injected by webpack
__webpack_nonce__ = getCSPNonce()
if (loadState('comments', 'activityEnabled', false) && OCA?.Activity?.registerSidebarAction !== undefined) {
// Do not mount own tab but mount into activity
window.addEventListener('DOMContentLoaded', function() {
registerCommentsPlugins()
})
} else {
// Init Comments tab component
let TabInstance = null
const commentTab = new OCA.Files.Sidebar.Tab({
id: 'comments',
name: t('comments', 'Comments'),
iconSvg: MessageReplyText,
async mount(el, fileInfo, context) {
if (TabInstance) {
TabInstance.$destroy()
}
TabInstance = new OCA.Comments.View('files', {
// Better integration with vue parent component
parent: context,
propsData: {
resourceId: fileInfo.id,
},
})
// Only mount after we have all the info we need
await TabInstance.update(fileInfo.id)
TabInstance.$mount(el)
},
update(fileInfo) {
TabInstance.update(fileInfo.id)
},
destroy() {
TabInstance.$destroy()
TabInstance = null
},
scrollBottomReached() {
TabInstance.onScrollBottomReached()
},
})
window.addEventListener('DOMContentLoaded', function() {
if (OCA.Files && OCA.Files.Sidebar) {
OCA.Files.Sidebar.registerTab(commentTab)
}
})
}
-48
View File
@@ -1,48 +0,0 @@
/**
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import MessageReplyText from '@mdi/svg/svg/message-reply-text.svg?raw'
import { getCSPNonce } from '@nextcloud/auth'
import { registerSidebarTab } from '@nextcloud/files'
import { loadState } from '@nextcloud/initial-state'
import { t } from '@nextcloud/l10n'
import wrap from '@vue/web-component-wrapper'
import { createPinia, PiniaVuePlugin } from 'pinia'
import Vue from 'vue'
import { registerCommentsPlugins } from './comments-activity-tab.ts'
__webpack_nonce__ = getCSPNonce()
const tagName = 'comments_files-sidebar-tab'
if (loadState('comments', 'activityEnabled', false) && OCA?.Activity?.registerSidebarAction !== undefined) {
// Do not mount own tab but mount into activity
window.addEventListener('DOMContentLoaded', function() {
registerCommentsPlugins()
})
} else {
registerSidebarTab({
id: 'comments',
displayName: t('comments', 'Comments'),
iconSvgInline: MessageReplyText,
order: 50,
tagName,
async onInit() {
const { default: FilesSidebarTab } = await import('./views/FilesSidebarTab.vue')
Vue.use(PiniaVuePlugin)
Vue.mixin({ pinia: createPinia() })
const webComponent = wrap(Vue, FilesSidebarTab)
// In Vue 2, wrap doesn't support disabling shadow. Disable with a hack
Object.defineProperty(webComponent.prototype, 'attachShadow', {
value() { return this },
})
Object.defineProperty(webComponent.prototype, 'shadowRoot', {
get() { return this },
})
window.customElements.define(tagName, webComponent)
},
})
}
+3 -4
View File
@@ -1,9 +1,8 @@
/*!
import { getCurrentUser } from '@nextcloud/auth'
/**
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import { getCurrentUser } from '@nextcloud/auth'
import axios from '@nextcloud/axios'
import { loadState } from '@nextcloud/initial-state'
import { generateOcsUrl } from '@nextcloud/router'
@@ -33,7 +32,7 @@ export default defineComponent({
},
methods: {
/**
* Autocomplete `@mentions`
* Autocomplete @mentions
*
* @param search the query
* @param callback the callback to process the results with
@@ -1,32 +0,0 @@
<!--
- SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
- SPDX-License-Identifier: AGPL-3.0-or-later
-->
<script setup lang="ts">
import type { IFolder, INode, IView } from '@nextcloud/files'
import { computed } from 'vue'
import Comments from './Comments.vue'
const props = defineProps<{
node?: INode
// eslint-disable-next-line vue/no-unused-properties -- Required on the web component interface
active?: boolean
// eslint-disable-next-line vue/no-unused-properties -- Required on the web component interface
folder?: IFolder
// eslint-disable-next-line vue/no-unused-properties -- Required on the web component interface
view?: IView
}>()
const resourceId = computed(() => props.node?.fileid)
</script>
<template>
<Comments
v-if="resourceId !== undefined"
:key="resourceId"
:resource-id="resourceId"
resource-type="files" />
</template>
@@ -26,7 +26,7 @@ use Test\TestCase;
*
* @package OCA\Comments\Tests\Unit\AppInfo
*/
#[\PHPUnit\Framework\Attributes\Group(name: 'DB')]
#[\PHPUnit\Framework\Attributes\Group('DB')]
class ApplicationTest extends TestCase {
protected function setUp(): void {
parent::setUp();
@@ -27,7 +27,7 @@ class CommentersSorterTest extends TestCase {
/**
* @param $data
*/
#[\PHPUnit\Framework\Attributes\DataProvider(methodName: 'sortDataProvider')]
#[\PHPUnit\Framework\Attributes\DataProvider('sortDataProvider')]
public function testSort($data): void {
$commentMocks = [];
foreach ($data['actors'] as $actorType => $actors) {
@@ -61,7 +61,7 @@ class EventHandlerTest extends TestCase {
];
}
#[\PHPUnit\Framework\Attributes\DataProvider(methodName: 'handledProvider')]
#[\PHPUnit\Framework\Attributes\DataProvider('handledProvider')]
public function testHandled(string $eventType): void {
/** @var IComment|MockObject $comment */
$comment = $this->createMock(IComment::class);
@@ -51,7 +51,7 @@ class ListenerTest extends TestCase {
* @param string $eventType
* @param string $notificationMethod
*/
#[\PHPUnit\Framework\Attributes\DataProvider(methodName: 'eventProvider')]
#[\PHPUnit\Framework\Attributes\DataProvider('eventProvider')]
public function testEvaluate(string $eventType, $notificationMethod): void {
/** @var IComment|MockObject $comment */
$comment = $this->createMock(IComment::class);
@@ -111,7 +111,7 @@ class ListenerTest extends TestCase {
$this->listener->evaluate($event);
}
#[\PHPUnit\Framework\Attributes\DataProvider(methodName: 'eventProvider')]
#[\PHPUnit\Framework\Attributes\DataProvider('eventProvider')]
public function testEvaluateNoMentions(string $eventType): void {
/** @var IComment|MockObject $comment */
$comment = $this->createMock(IComment::class);
-9
View File
@@ -1,9 +0,0 @@
OC.L10N.register(
"contactsinteraction",
{
"Recently contacted" : "Baru-baru ini dihubungi",
"Contacts Interaction" : "Interaksi Kontak",
"Manages interaction between accounts and contacts" : "Mengelola interaksi antara akun dan kontak",
"Collect data about accounts and contacts interactions and provide an address book for the data" : "Mengumpulkan data tentang interaksi akun dan kontak serta menyediakan buku alamat untuk data tersebut"
},
"nplurals=1; plural=0;");
-7
View File
@@ -1,7 +0,0 @@
{ "translations": {
"Recently contacted" : "Baru-baru ini dihubungi",
"Contacts Interaction" : "Interaksi Kontak",
"Manages interaction between accounts and contacts" : "Mengelola interaksi antara akun dan kontak",
"Collect data about accounts and contacts interactions and provide an address book for the data" : "Mengumpulkan data tentang interaksi akun dan kontak serta menyediakan buku alamat untuk data tersebut"
},"pluralForm" :"nplurals=1; plural=0;"
}
@@ -17,7 +17,7 @@ use Sabre\VObject\Component\VCard;
use Sabre\VObject\UUIDUtil;
use Test\TestCase;
#[\PHPUnit\Framework\Attributes\Group(name: 'DB')]
#[\PHPUnit\Framework\Attributes\Group('DB')]
class RecentContactMapperTest extends TestCase {
private RecentContactMapper $recentContactMapper;
private ITimeFactory $time;
-4
View File
@@ -3,7 +3,6 @@ OC.L10N.register(
{
"Dashboard" : "Dasbor",
"Dashboard app" : "Aplikasi dasbor",
"Start your day informed\n\nThe Nextcloud Dashboard is your starting point of the day, giving you an overview of your upcoming appointments, urgent emails, chat messages, incoming tickets, latest tweets and much more! People can add the widgets they like and change the background to their liking." : "Mulai hari Anda dengan informasi\n\nDasbor Nextcloud adalah titik awal hari Anda, memberikan ikhtisar janji temu mendatang, email mendesak, pesan obrolan, tiket masuk, tweet terbaru, dan masih banyak lagi! Orang dapat menambahkan widget yang mereka sukai dan mengubah latar belakang sesuai keinginan mereka.",
"Weather" : "Cuaca",
"Status" : "Status",
"Good morning" : "Selamat pagi",
@@ -14,13 +13,10 @@ OC.L10N.register(
"Good evening, {name}" : "Selamat malam, {name}",
"Hello" : "Halo",
"Hello, {name}" : "Halo, {name}",
"Happy birthday 🥳🤩🎂🎉" : "Selamat ulang tahun 🥳🤩🎂🎉",
"Happy birthday, {name} 🥳🤩🎂🎉" : "Selamat ulang tahun, {name} 🥳🤩🎂🎉",
"Customize" : "Sesuaikan",
"Edit widgets" : "Edit widget",
"Get more widgets from the App Store" : "Dapatkan lebih banyak widget dari App Store",
"Weather service" : "Layanan cuaca",
"For your privacy, the weather data is requested by your {productName} server on your behalf so the weather service receives no personal information." : "Demi privasi Anda, data cuaca diminta oleh server {productName} Anda atas nama Anda sehingga layanan cuaca tidak menerima informasi pribadi apa pun.",
"Weather data from Met.no" : "Data cuaca dari Met.no",
"geocoding with Nominatim" : "Secara khusus, dengan geocoding",
"elevation data from OpenTopoData" : "data ketinggian dari OpenTopoData",
-4
View File
@@ -1,7 +1,6 @@
{ "translations": {
"Dashboard" : "Dasbor",
"Dashboard app" : "Aplikasi dasbor",
"Start your day informed\n\nThe Nextcloud Dashboard is your starting point of the day, giving you an overview of your upcoming appointments, urgent emails, chat messages, incoming tickets, latest tweets and much more! People can add the widgets they like and change the background to their liking." : "Mulai hari Anda dengan informasi\n\nDasbor Nextcloud adalah titik awal hari Anda, memberikan ikhtisar janji temu mendatang, email mendesak, pesan obrolan, tiket masuk, tweet terbaru, dan masih banyak lagi! Orang dapat menambahkan widget yang mereka sukai dan mengubah latar belakang sesuai keinginan mereka.",
"Weather" : "Cuaca",
"Status" : "Status",
"Good morning" : "Selamat pagi",
@@ -12,13 +11,10 @@
"Good evening, {name}" : "Selamat malam, {name}",
"Hello" : "Halo",
"Hello, {name}" : "Halo, {name}",
"Happy birthday 🥳🤩🎂🎉" : "Selamat ulang tahun 🥳🤩🎂🎉",
"Happy birthday, {name} 🥳🤩🎂🎉" : "Selamat ulang tahun, {name} 🥳🤩🎂🎉",
"Customize" : "Sesuaikan",
"Edit widgets" : "Edit widget",
"Get more widgets from the App Store" : "Dapatkan lebih banyak widget dari App Store",
"Weather service" : "Layanan cuaca",
"For your privacy, the weather data is requested by your {productName} server on your behalf so the weather service receives no personal information." : "Demi privasi Anda, data cuaca diminta oleh server {productName} Anda atas nama Anda sehingga layanan cuaca tidak menerima informasi pribadi apa pun.",
"Weather data from Met.no" : "Data cuaca dari Met.no",
"geocoding with Nominatim" : "Secara khusus, dengan geocoding",
"elevation data from OpenTopoData" : "data ketinggian dari OpenTopoData",
-1
View File
@@ -20,7 +20,6 @@ OC.L10N.register(
"Edit widgets" : "Widgets bewerken",
"Get more widgets from the App Store" : "Haal meer widgets op uit de App Store",
"Weather service" : "Weerberichten",
"For your privacy, the weather data is requested by your {productName} server on your behalf so the weather service receives no personal information." : "Voor je privacy worden de weergegevens namens jou opgevraagd door je {productName} server, zodat de weer dienst geen persoonlijke informatie ontvangt.",
"Weather data from Met.no" : "Weerbericht via Met.no",
"geocoding with Nominatim" : "geocoding met Nominatim",
"elevation data from OpenTopoData" : "hoogtedata via OpenTopoData",
-1
View File
@@ -18,7 +18,6 @@
"Edit widgets" : "Widgets bewerken",
"Get more widgets from the App Store" : "Haal meer widgets op uit de App Store",
"Weather service" : "Weerberichten",
"For your privacy, the weather data is requested by your {productName} server on your behalf so the weather service receives no personal information." : "Voor je privacy worden de weergegevens namens jou opgevraagd door je {productName} server, zodat de weer dienst geen persoonlijke informatie ontvangt.",
"Weather data from Met.no" : "Weerbericht via Met.no",
"geocoding with Nominatim" : "geocoding met Nominatim",
"elevation data from OpenTopoData" : "hoogtedata via OpenTopoData",
-1
View File
@@ -20,7 +20,6 @@ OC.L10N.register(
"Edit widgets" : "Редагувати віджети",
"Get more widgets from the App Store" : "Більше віджетів у каталозі застосунків",
"Weather service" : "Погода",
"For your privacy, the weather data is requested by your {productName} server on your behalf so the weather service receives no personal information." : "Для вашої конфіденційності дані погоди буде запитано вашим сервером {productName} від вашого імени, таким чином сервіс надання погоди не отримуватиме ваших приватних даних. ",
"Weather data from Met.no" : "Дані про погоду з Met.no",
"geocoding with Nominatim" : "геокодування за допомогою Nominatim",
"elevation data from OpenTopoData" : "дані про висоту з OpenTopoData",
-1
View File
@@ -18,7 +18,6 @@
"Edit widgets" : "Редагувати віджети",
"Get more widgets from the App Store" : "Більше віджетів у каталозі застосунків",
"Weather service" : "Погода",
"For your privacy, the weather data is requested by your {productName} server on your behalf so the weather service receives no personal information." : "Для вашої конфіденційності дані погоди буде запитано вашим сервером {productName} від вашого імени, таким чином сервіс надання погоди не отримуватиме ваших приватних даних. ",
"Weather data from Met.no" : "Дані про погоду з Met.no",
"geocoding with Nominatim" : "геокодування за допомогою Nominatim",
"elevation data from OpenTopoData" : "дані про висоту з OpenTopoData",
@@ -18,7 +18,6 @@ use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\OCSController;
use OCP\AppFramework\Services\IAppConfig;
use OCP\Config\IUserConfig;
use OCP\Dashboard\IAPIWidget;
use OCP\Dashboard\IAPIWidgetV2;
use OCP\Dashboard\IButtonWidget;
@@ -31,6 +30,7 @@ use OCP\Dashboard\Model\WidgetButton;
use OCP\Dashboard\Model\WidgetItem;
use OCP\Dashboard\Model\WidgetOptions;
use OCP\IConfig;
use OCP\IRequest;
/**
@@ -45,7 +45,7 @@ class DashboardApiController extends OCSController {
IRequest $request,
private IManager $dashboardManager,
private IAppConfig $appConfig,
private IUserConfig $userConfig,
private IConfig $config,
private ?string $userId,
private DashboardService $service,
) {
@@ -59,7 +59,7 @@ class DashboardApiController extends OCSController {
private function getShownWidgets(array $widgetIds): array {
if (empty($widgetIds)) {
$systemDefault = $this->appConfig->getAppValueString('layout', 'recommendations,spreed,mail,calendar');
$widgetIds = explode(',', $this->userConfig->getValueString($this->userId, 'dashboard', 'layout', $systemDefault));
$widgetIds = explode(',', $this->config->getUserValue($this->userId, 'dashboard', 'layout', $systemDefault));
}
return array_filter(
@@ -202,7 +202,7 @@ class DashboardApiController extends OCSController {
#[NoAdminRequired]
#[ApiRoute(verb: 'POST', url: '/api/v3/layout')]
public function updateLayout(array $layout): DataResponse {
$this->userConfig->setValueString($this->userId, 'dashboard', 'layout', implode(',', $layout));
$this->config->setUserValue($this->userId, 'dashboard', 'layout', implode(',', $layout));
return new DataResponse(['layout' => $layout]);
}
@@ -230,7 +230,7 @@ class DashboardApiController extends OCSController {
#[NoAdminRequired]
#[ApiRoute(verb: 'POST', url: '/api/v3/statuses')]
public function updateStatuses(array $statuses): DataResponse {
$this->userConfig->setValueString($this->userId, 'dashboard', 'statuses', implode(',', $statuses));
$this->config->setUserValue($this->userId, 'dashboard', 'statuses', implode(',', $statuses));
return new DataResponse(['statuses' => $statuses]);
}
}
@@ -17,10 +17,10 @@ use OCP\AppFramework\Http\Attribute\OpenAPI;
use OCP\AppFramework\Http\FeaturePolicy;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\AppFramework\Services\IInitialState;
use OCP\Config\IUserConfig;
use OCP\Dashboard\IIconWidget;
use OCP\Dashboard\IManager;
use OCP\Dashboard\IWidget;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\IConfig;
use OCP\IL10N;
use OCP\IRequest;
@@ -33,9 +33,9 @@ class DashboardController extends Controller {
string $appName,
IRequest $request,
private IInitialState $initialState,
private IEventDispatcher $eventDispatcher,
private IManager $dashboardManager,
private IConfig $config,
private IUserConfig $userConfig,
private IL10N $l10n,
private ?string $userId,
private DashboardService $service,
@@ -67,9 +67,9 @@ class DashboardController extends Controller {
$this->initialState->provideInitialState('statuses', $this->service->getStatuses());
$this->initialState->provideInitialState('layout', $this->service->getLayout());
$this->initialState->provideInitialState('appStoreEnabled', $this->config->getSystemValueBool('appstoreenabled', true));
$this->initialState->provideInitialState('firstRun', $this->userConfig->getValueBool($this->userId, 'dashboard', 'firstRun', true));
$this->initialState->provideInitialState('firstRun', $this->config->getUserValue($this->userId, 'dashboard', 'firstRun', '1') === '1');
$this->initialState->provideInitialState('birthdate', $this->service->getBirthdate());
$this->userConfig->setValueBool($this->userId, 'dashboard', 'firstRun', false);
$this->config->setUserValue($this->userId, 'dashboard', 'firstRun', '0');
$response = new TemplateResponse('dashboard', 'index', [
'id-app-content' => '#app-dashboard',
@@ -12,12 +12,12 @@ use JsonException;
use OCP\Accounts\IAccountManager;
use OCP\Accounts\PropertyDoesNotExistException;
use OCP\AppFramework\Services\IAppConfig;
use OCP\Config\IUserConfig;
use OCP\IConfig;
use OCP\IUserManager;
class DashboardService {
public function __construct(
private IUserConfig $userConfig,
private IConfig $config,
private IAppConfig $appConfig,
private ?string $userId,
private IUserManager $userManager,
@@ -31,24 +31,21 @@ class DashboardService {
*/
public function getLayout(): array {
$systemDefault = $this->appConfig->getAppValueString('layout', 'recommendations,spreed,mail,calendar');
return array_values(array_filter(
explode(',', $this->userConfig->getValueString($this->userId, 'dashboard', 'layout', $systemDefault)),
fn (string $value) => $value !== '')
);
return array_values(array_filter(explode(',', $this->config->getUserValue($this->userId, 'dashboard', 'layout', $systemDefault)), fn (string $value) => $value !== ''));
}
/**
* @return list<string>
*/
public function getStatuses(): array {
$configStatuses = $this->userConfig->getValueString($this->userId, 'dashboard', 'statuses');
public function getStatuses() {
$configStatuses = $this->config->getUserValue($this->userId, 'dashboard', 'statuses', '');
try {
// Parse the old format
/** @var array<string, bool> $statuses */
$statuses = json_decode($configStatuses, true, 512, JSON_THROW_ON_ERROR);
// We avoid getting an empty array as it will not produce an object in UI's JS
return array_keys(array_filter($statuses, static fn (bool $value) => $value));
} catch (JsonException) {
} catch (JsonException $e) {
return array_values(array_filter(explode(',', $configStatuses), fn (string $value) => $value !== ''));
}
}
@@ -13,7 +13,7 @@ use OC\Accounts\Account;
use OCA\Dashboard\Service\DashboardService;
use OCP\Accounts\IAccountManager;
use OCP\AppFramework\Services\IAppConfig;
use OCP\Config\IUserConfig;
use OCP\IConfig;
use OCP\IUser;
use OCP\IUserManager;
use PHPUnit\Framework\MockObject\MockObject;
@@ -21,7 +21,7 @@ use Test\TestCase;
class DashboardServiceTest extends TestCase {
private IUserConfig&MockObject $userConfig;
private IConfig&MockObject $config;
private IAppConfig&MockObject $appConfig;
private IUserManager&MockObject $userManager;
private IAccountManager&MockObject $accountManager;
@@ -30,13 +30,13 @@ class DashboardServiceTest extends TestCase {
protected function setUp(): void {
parent::setUp();
$this->userConfig = $this->createMock(IUserConfig::class);
$this->config = $this->createMock(IConfig::class);
$this->appConfig = $this->createMock(IAppConfig::class);
$this->userManager = $this->createMock(IUserManager::class);
$this->accountManager = $this->createMock(IAccountManager::class);
$this->service = new DashboardService(
$this->userConfig,
$this->config,
$this->appConfig,
'alice',
$this->userManager,
@@ -90,7 +90,7 @@ class DashboardServiceTest extends TestCase {
public function testGetBirthdateNoUserId(): void {
$service = new DashboardService(
$this->userConfig,
$this->config,
$this->appConfig,
null,
$this->userManager,
+3 -5
View File
@@ -24,7 +24,6 @@ use OCA\DAV\Connector\Sabre\Principal;
use OCP\Accounts\IAccountManager;
use OCP\App\IAppManager;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\IAppConfig;
use OCP\ICacheFactory;
use OCP\IConfig;
use OCP\IDBConnection;
@@ -57,7 +56,7 @@ $principalBackend = new Principal(
Server::get(ProxyMapper::class),
Server::get(KnownUserService::class),
Server::get(IConfig::class),
Server::get(IL10NFactory::class),
\OC::$server->getL10NFactory(),
'principals/'
);
$db = Server::get(IDBConnection::class);
@@ -85,7 +84,7 @@ $calDavBackend = new CalDavBackend(
);
$debugging = Server::get(IConfig::class)->getSystemValue('debug', false);
$sendInvitations = Server::get(IAppConfig::class)->getValueBool('dav', 'sendInvitations', true);
$sendInvitations = Server::get(IConfig::class)->getAppValue('dav', 'sendInvitations', 'yes') === 'yes';
// Root nodes
$principalCollection = new \Sabre\CalDAV\Principal\Collection($principalBackend);
@@ -103,7 +102,6 @@ $nodes = [
$server = new \Sabre\DAV\Server($nodes);
$server::$exposeVersion = false;
$server->httpRequest->setUrl(Server::get(IRequest::class)->getRequestUri());
/** @var string $baseuri defined in remote.php */
$server->setBaseUri($baseuri);
// Add plugins
@@ -128,4 +126,4 @@ $server->addPlugin(Server::get(RateLimitingPlugin::class));
$server->addPlugin(Server::get(CalDavValidatePlugin::class));
// And off we go!
$server->start();
$server->exec();
+3 -5
View File
@@ -30,7 +30,6 @@ use OCP\IRequest;
use OCP\ISession;
use OCP\IUserManager;
use OCP\IUserSession;
use OCP\L10N\IFactory as IL10nFactory;
use OCP\Security\Bruteforce\IThrottler;
use OCP\Server;
use Psr\Log\LoggerInterface;
@@ -54,7 +53,7 @@ $principalBackend = new Principal(
Server::get(ProxyMapper::class),
Server::get(KnownUserService::class),
Server::get(IConfig::class),
Server::get(IL10nFactory::class),
\OC::$server->getL10NFactory(),
'principals/'
);
$db = Server::get(IDBConnection::class);
@@ -86,10 +85,9 @@ $nodes = [
$server = new \Sabre\DAV\Server($nodes);
$server::$exposeVersion = false;
$server->httpRequest->setUrl(Server::get(IRequest::class)->getRequestUri());
/** @var string $baseuri defined in remote.php */
$server->setBaseUri($baseuri);
// Add plugins
$server->addPlugin(new MaintenancePlugin(Server::get(IConfig::class), \OCP\Server::get(IL10nFactory::class)->get('dav')));
$server->addPlugin(new MaintenancePlugin(Server::get(IConfig::class), \OC::$server->getL10N('dav')));
$server->addPlugin(new \Sabre\DAV\Auth\Plugin($authBackend));
$server->addPlugin(new Plugin());
@@ -106,4 +104,4 @@ $server->addPlugin(Server::get(CardDavRateLimitingPlugin::class));
$server->addPlugin(Server::get(CardDavValidatePlugin::class));
// And off we go!
$server->start();
$server->exec();
+5 -10
View File
@@ -14,7 +14,6 @@ use OCA\DAV\Files\Sharing\FilesDropPlugin;
use OCA\DAV\Files\Sharing\PublicLinkCheckPlugin;
use OCA\DAV\Storage\PublicOwnerWrapper;
use OCA\FederatedFileSharing\FederatedShareProvider;
use OCP\App\IAppManager;
use OCP\BeforeSabrePubliclyLoadedEvent;
use OCP\Constants;
use OCP\EventDispatcher\IEventDispatcher;
@@ -27,19 +26,16 @@ use OCP\IRequest;
use OCP\ISession;
use OCP\ITagManager;
use OCP\IUserSession;
use OCP\L10N\IFactory as IL10nFactory;
use OCP\Security\Bruteforce\IThrottler;
use OCP\Server;
use Psr\Log\LoggerInterface;
// load needed apps
$RUNTIME_APPTYPES = ['filesystem', 'authentication', 'logging'];
Server::get(IAppManager::class)->loadApps($RUNTIME_APPTYPES);
// Turn off output buffering to prevent memory problems
while (ob_get_level()) {
ob_end_clean();
}
OC_App::loadApps($RUNTIME_APPTYPES);
OC_Util::obEnd();
Server::get(ISession::class)->close();
// Backends
@@ -64,7 +60,7 @@ $serverFactory = new ServerFactory(
Server::get(IRequest::class),
Server::get(IPreview::class),
$eventDispatcher,
Server::get(IL10nFactory::class)->get('dav')
\OC::$server->getL10N('dav')
);
$requestUri = Server::get(IRequest::class)->getRequestUri();
@@ -72,7 +68,6 @@ $requestUri = Server::get(IRequest::class)->getRequestUri();
$linkCheckPlugin = new PublicLinkCheckPlugin();
$filesDropPlugin = new FilesDropPlugin();
/** @var string $baseuri defined in public.php */
$server = $serverFactory->createServer(
true,
$baseuri,
@@ -130,4 +125,4 @@ $event = new BeforeSabrePubliclyLoadedEvent($server);
$eventDispatcher->dispatchTyped($event);
// And off we go!
$server->start();
$server->exec();
+3 -7
View File
@@ -19,7 +19,6 @@ use OCP\IRequest;
use OCP\ISession;
use OCP\ITagManager;
use OCP\IUserSession;
use OCP\L10N\IFactory as IL10nFactory;
use OCP\SabrePluginEvent;
use OCP\Security\Bruteforce\IThrottler;
use OCP\Server;
@@ -32,9 +31,7 @@ if (!str_contains(@ini_get('disable_functions'), 'set_time_limit')) {
ignore_user_abort(true);
// Turn off output buffering to prevent memory problems
while (ob_get_level()) {
ob_end_clean();
}
\OC_Util::obEnd();
$dispatcher = Server::get(IEventDispatcher::class);
@@ -48,7 +45,7 @@ $serverFactory = new ServerFactory(
Server::get(IRequest::class),
Server::get(IPreview::class),
$dispatcher,
Server::get(IL10nFactory::class)->get('dav')
\OC::$server->getL10N('dav')
);
// Backends
@@ -71,7 +68,6 @@ $authPlugin->addBackend($bearerAuthPlugin);
$requestUri = Server::get(IRequest::class)->getRequestUri();
/** @var string $baseuri defined in remote.php */
$server = $serverFactory->createServer(false, $baseuri, $requestUri, $authPlugin, function () {
// use the view for the logged in user
return Filesystem::getView();
@@ -84,4 +80,4 @@ $event = new SabrePluginAddEvent($server);
$dispatcher->dispatchTyped($event);
// And off we go!
$server->start();
$server->exec();
+2 -5
View File
@@ -21,15 +21,12 @@ if (!str_contains(@ini_get('disable_functions'), 'set_time_limit')) {
ignore_user_abort(true);
// Turn off output buffering to prevent memory problems
while (ob_get_level()) {
ob_end_clean();
}
\OC_Util::obEnd();
$requestUri = Server::get(IRequest::class)->getRequestUri();
/** @var ServerFactory $serverFactory */
$serverFactory = Server::get(ServerFactory::class);
/** @var string $baseuri defined in remote.php */
$server = $serverFactory->createServer(
$baseuri,
$requestUri,
@@ -40,4 +37,4 @@ $server = $serverFactory->createServer(
Server::get(IRequest::class)
);
$server->start();
$server->exec();

Some files were not shown because too many files have changed in this diff Show More