mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
Merge branch 'master' into fix-nc-env-inclusion
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
commit
13088b745a
4953 changed files with 111240 additions and 77991 deletions
|
|
@ -52,6 +52,9 @@ RUN { \
|
|||
echo "xdebug.start_with_request=yes"; \
|
||||
} >> /etc/php/8.3/apache2/conf.d/20-xdebug.ini
|
||||
|
||||
# Increase PHP memory limit to 512mb
|
||||
RUN sed -i 's/memory_limit = .*/memory_limit = 512M/' /etc/php/8.3/apache2/php.ini
|
||||
|
||||
# Docker
|
||||
RUN apt-get -y install \
|
||||
apt-transport-https \
|
||||
|
|
|
|||
|
|
@ -36,4 +36,13 @@ module.exports = {
|
|||
mode: 'typescript',
|
||||
},
|
||||
},
|
||||
overrides: [
|
||||
// Allow any in tests
|
||||
{
|
||||
files: ['**/*.spec.ts'],
|
||||
rules: {
|
||||
'@typescript-eslint/no-explicit-any': 'warn',
|
||||
},
|
||||
}
|
||||
],
|
||||
}
|
||||
|
|
|
|||
15
.git-blame-ignore-revs
Normal file
15
.git-blame-ignore-revs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# .git-blame-ignore-revs
|
||||
|
||||
# SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
# Format control structures
|
||||
caff1023ea72bb2ea94130e18a2a6e2ccf819e5f
|
||||
# Update to coding-standard 1.1.1
|
||||
aa5f037af71c915424c6dcfd5ad2dc82797dc0d6
|
||||
# Update to coding-standard 1.2.3
|
||||
af6de04e9e141466dc229e444ff3f146f4a34765
|
||||
0bd284cb81b6866338aaaa67aa1d81ef9bfbb2ab
|
||||
8af7ecb2576071f170ecbb0aa2311b26581e40e2
|
||||
# Automated refactorings
|
||||
49dd79eabb2b8902559a7a4e8f8fcad54f46b604
|
||||
3
.github/CODEOWNERS
vendored
3
.github/CODEOWNERS
vendored
|
|
@ -1,7 +1,7 @@
|
|||
# App maintainers
|
||||
/apps/admin_audit/appinfo/info.xml @luka-nextcloud @blizzz
|
||||
/apps/cloud_federation_api/appinfo/info.xml @mejo-
|
||||
/apps/comments/appinfo/info.xml @marcelklehr @Pytal
|
||||
/apps/comments/appinfo/info.xml @edward-ly @Pytal
|
||||
/apps/contactsinteraction/appinfo/info.xml @kesselb @miaulalala @ChristophWurst @GretaD @hamza221 @st3iny
|
||||
/apps/dashboard/appinfo/info.xml @julien-nc @juliushaertl
|
||||
/apps/dav/lib/CalDAV @ChristophWurst @miaulalala @tcitworld
|
||||
|
|
@ -26,6 +26,7 @@
|
|||
/apps/user_ldap/appinfo/info.xml @come-nc @blizzz
|
||||
/apps/user_status/appinfo/info.xml @Antreesy @nickvergessen
|
||||
/apps/weather_status/appinfo/info.xml @julien-nc @juliushaertl
|
||||
/apps/webhook_listeners/appinfo/info.xml @come-nc @julien-nc
|
||||
/apps/workflowengine/appinfo/info.xml @blizzz @juliushaertl
|
||||
|
||||
# Frontend expertise
|
||||
|
|
|
|||
4
.github/CONTRIBUTING.md
vendored
4
.github/CONTRIBUTING.md
vendored
|
|
@ -4,7 +4,7 @@
|
|||
-->
|
||||
## Submitting issues
|
||||
|
||||
If you have questions about how to install or use Nextcloud, please direct these to our [forum][forum]. We are also available on [IRC][irc].
|
||||
If you have questions about how to install or use Nextcloud, please direct these to our [forum][forum]. We are also available on [IRC][irc] (unofficial).
|
||||
|
||||
### Short version
|
||||
|
||||
|
|
@ -25,7 +25,7 @@ Help us to maximize the effort we can spend fixing issues and adding new feature
|
|||
|
||||
[templates]: ./ISSUE_TEMPLATE
|
||||
[forum]: https://help.nextcloud.com/
|
||||
[irc]: https://webchat.freenode.net/?channels=nextcloud
|
||||
[irc]: https://web.libera.chat/#nextcloud
|
||||
|
||||
## Contributing to Source Code
|
||||
|
||||
|
|
|
|||
23
.github/ISSUE_TEMPLATE/BUG_REPORT.yml
vendored
23
.github/ISSUE_TEMPLATE/BUG_REPORT.yml
vendored
|
|
@ -62,22 +62,6 @@ body:
|
|||
description: Describe what you expected to happen instead.
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: install-method
|
||||
attributes:
|
||||
label: Installation method
|
||||
description: |
|
||||
Select installation method you've used.
|
||||
_Describe the method in the "Additional info" section if you chose "Other"._
|
||||
options:
|
||||
- "Community Web installer on a VPS or web space"
|
||||
- "Community Manual installation with Archive"
|
||||
- "Community Docker image"
|
||||
- "Community NextcloudPi appliance"
|
||||
- "Community SNAP package"
|
||||
- "Community VM appliance"
|
||||
- "Other Community project"
|
||||
- "Official All-in-One appliance"
|
||||
- type: dropdown
|
||||
id: nextcloud-version
|
||||
attributes:
|
||||
|
|
@ -88,6 +72,7 @@ body:
|
|||
options:
|
||||
- "28"
|
||||
- "29"
|
||||
- "30"
|
||||
- "master"
|
||||
validations:
|
||||
required: true
|
||||
|
|
@ -110,10 +95,10 @@ body:
|
|||
Select PHP engine version serving Nextcloud Server.
|
||||
_Describe in the "Additional info" section if you chose "Other"._
|
||||
options:
|
||||
- "PHP 8.0"
|
||||
- "PHP 8.1"
|
||||
- "PHP 8.2"
|
||||
- "PHP 8.3"
|
||||
- "PHP 8.2"
|
||||
- "PHP 8.1"
|
||||
- "PHP 8.0"
|
||||
- "Other"
|
||||
- type: dropdown
|
||||
id: webserver
|
||||
|
|
|
|||
37
.github/dependabot.yml
vendored
37
.github/dependabot.yml
vendored
|
|
@ -138,6 +138,25 @@ updates:
|
|||
# Disable automatic rebasing because without a build CI will likely fail anyway
|
||||
rebase-strategy: "disabled"
|
||||
|
||||
- package-ecosystem: npm
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: saturday
|
||||
time: "03:00"
|
||||
timezone: Europe/Paris
|
||||
target-branch: stable30
|
||||
labels:
|
||||
- "3. to review"
|
||||
- "feature: dependencies"
|
||||
reviewers:
|
||||
- "nextcloud/server-dependabot"
|
||||
ignore:
|
||||
- dependency-name: "*"
|
||||
update-types: ["version-update:semver-major", "version-update:semver-minor"]
|
||||
# Disable automatic rebasing because without a build CI will likely fail anyway
|
||||
rebase-strategy: "disabled"
|
||||
|
||||
- package-ecosystem: composer
|
||||
directory: "/build/integration"
|
||||
schedule:
|
||||
|
|
@ -174,6 +193,24 @@ updates:
|
|||
- dependency-name: "*"
|
||||
update-types: ["version-update:semver-major", "version-update:semver-minor", "version-update:semver-patch"]
|
||||
|
||||
- package-ecosystem: composer
|
||||
directory: "/build/integration"
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: saturday
|
||||
time: "03:00"
|
||||
timezone: Europe/Paris
|
||||
target-branch: stable30
|
||||
labels:
|
||||
- "3. to review"
|
||||
- "feature: dependencies"
|
||||
reviewers:
|
||||
- "nextcloud/server-dependabot"
|
||||
ignore:
|
||||
# ignore all GitHub linguist patch updates
|
||||
- dependency-name: "*"
|
||||
update-types: ["version-update:semver-major", "version-update:semver-minor", "version-update:semver-patch"]
|
||||
|
||||
# GitHub Actions
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
|
|
|
|||
4
.github/workflows/autocheckers.yml
vendored
4
.github/workflows/autocheckers.yml
vendored
|
|
@ -45,7 +45,7 @@ jobs:
|
|||
|
||||
strategy:
|
||||
matrix:
|
||||
php-versions: ['8.3']
|
||||
php-versions: ['8.1']
|
||||
|
||||
name: PHP checkers
|
||||
|
||||
|
|
@ -56,7 +56,7 @@ jobs:
|
|||
submodules: true
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b #v2.31.0
|
||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
extensions: ctype, json, mbstring
|
||||
|
|
|
|||
39
.github/workflows/command-compile.yml
vendored
39
.github/workflows/command-compile.yml
vendored
|
|
@ -26,6 +26,28 @@ jobs:
|
|||
base_ref: ${{ steps.comment-branch.outputs.base_ref }}
|
||||
|
||||
steps:
|
||||
- name: Get repository from pull request comment
|
||||
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||
id: get-repository
|
||||
with:
|
||||
github-token: ${{secrets.GITHUB_TOKEN}}
|
||||
script: |
|
||||
const pull = await github.rest.pulls.get({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
pull_number: context.issue.number
|
||||
});
|
||||
|
||||
const repositoryName = pull.data.head?.repo?.full_name
|
||||
console.log(repositoryName)
|
||||
return repositoryName
|
||||
|
||||
- name: Disabled on forks
|
||||
if: ${{ fromJSON(steps.get-repository.outputs.result) != github.repository }}
|
||||
run: |
|
||||
echo 'Can not execute /compile on forks'
|
||||
exit 1
|
||||
|
||||
- name: Check actor permission
|
||||
uses: skjnldsv/check-actor-permission@69e92a3c4711150929bca9fcf34448c5bf5526e7 # v2
|
||||
with:
|
||||
|
|
@ -57,6 +79,15 @@ jobs:
|
|||
uses: xt0rted/pull-request-comment-branch@d97294d304604fa98a2600a6e2f916a84b596dc7 # v1
|
||||
id: comment-branch
|
||||
|
||||
- name: Add reaction on failure
|
||||
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
|
||||
if: failure()
|
||||
with:
|
||||
token: ${{ secrets.COMMAND_BOT_PAT }}
|
||||
repository: ${{ github.event.repository.full_name }}
|
||||
comment-id: ${{ github.event.comment.id }}
|
||||
reactions: "-1"
|
||||
|
||||
process:
|
||||
runs-on: ubuntu-latest
|
||||
needs: init
|
||||
|
|
@ -88,14 +119,14 @@ jobs:
|
|||
fallbackNpm: '^10'
|
||||
|
||||
- name: Set up node ${{ steps.package-engines-versions.outputs.nodeVersion }}
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v3
|
||||
with:
|
||||
node-version: ${{ steps.package-engines-versions.outputs.nodeVersion }}
|
||||
cache: npm
|
||||
|
||||
- name: Set up npm ${{ steps.package-engines-versions.outputs.npmVersion }}
|
||||
run: npm i -g 'npm@${{ steps.package-engines-versions.outputs.npmVersion }}'
|
||||
|
||||
|
||||
- name: Rebase to ${{ needs.init.outputs.base_ref }}
|
||||
if: ${{ contains(needs.init.outputs.arg1, 'rebase') }}
|
||||
run: |
|
||||
|
|
@ -115,7 +146,7 @@ jobs:
|
|||
run: |
|
||||
git add '${{ github.workspace }}${{ needs.init.outputs.git_path }}'
|
||||
git commit --signoff -m 'chore(assets): Recompile assets'
|
||||
|
||||
|
||||
- name: Commit fixup
|
||||
if: ${{ contains(needs.init.outputs.arg1, 'fixup') }}
|
||||
run: |
|
||||
|
|
@ -129,7 +160,7 @@ jobs:
|
|||
git commit --amend --no-edit --signoff
|
||||
# Remove any [skip ci] from the amended commit
|
||||
git commit --amend -m "$(git log -1 --format='%B' | sed '/\[skip ci\]/d')"
|
||||
|
||||
|
||||
- name: Push normally
|
||||
if: ${{ !contains(needs.init.outputs.arg1, 'rebase') && !contains(needs.init.outputs.arg1, 'amend') }}
|
||||
run: git push origin '${{ needs.init.outputs.head_ref }}'
|
||||
|
|
|
|||
6
.github/workflows/command-pull-3rdparty.yml
vendored
6
.github/workflows/command-pull-3rdparty.yml
vendored
|
|
@ -27,6 +27,12 @@ jobs:
|
|||
comment-id: ${{ github.event.comment.id }}
|
||||
reactions: '+1'
|
||||
|
||||
- name: Disabled on forks
|
||||
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
|
||||
run: |
|
||||
echo 'Can not execute /update-3rdparty on forks'
|
||||
exit 1
|
||||
|
||||
- name: Init branch
|
||||
uses: xt0rted/pull-request-comment-branch@d97294d304604fa98a2600a6e2f916a84b596dc7 # v1
|
||||
id: comment-branch
|
||||
|
|
|
|||
33
.github/workflows/cypress.yml
vendored
33
.github/workflows/cypress.yml
vendored
|
|
@ -29,9 +29,17 @@ jobs:
|
|||
npmVersion: ${{ steps.versions.outputs.npmVersion }}
|
||||
|
||||
env:
|
||||
# We'll install cypress in the cypress job
|
||||
CYPRESS_INSTALL_BINARY: 0
|
||||
PUPPETEER_SKIP_DOWNLOAD: true
|
||||
|
||||
steps:
|
||||
- name: Disabled on forks
|
||||
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
|
||||
run: |
|
||||
echo 'Can not run cypress on forks'
|
||||
exit 1
|
||||
|
||||
- name: Checkout server
|
||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||
with:
|
||||
|
|
@ -56,7 +64,7 @@ jobs:
|
|||
fallbackNpm: "^10"
|
||||
|
||||
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
|
||||
with:
|
||||
node-version: ${{ steps.versions.outputs.nodeVersion }}
|
||||
|
||||
|
|
@ -72,7 +80,7 @@ jobs:
|
|||
run: npm run cypress:version
|
||||
|
||||
- name: Save context
|
||||
uses: buildjet/cache/save@e376f15c6ec6dc595375c78633174c7e5f92dc0e # v3
|
||||
uses: buildjet/cache/save@v4
|
||||
with:
|
||||
key: cypress-context-${{ github.run_id }}
|
||||
path: ./
|
||||
|
|
@ -86,32 +94,37 @@ jobs:
|
|||
matrix:
|
||||
# Run multiple copies of the current job in parallel
|
||||
# Please increase the number or runners as your tests suite grows (0 based index for e2e tests)
|
||||
containers: ["component", '0', '1', '2', '3', '4', '5']
|
||||
containers: ["component", '0', '1', '2', '3', '4', '5', '6', '7']
|
||||
# Hack as strategy.job-total includes the component and GitHub does not allow math expressions
|
||||
# Always align this number with the total of e2e runners (max. index + 1)
|
||||
total-containers: [6]
|
||||
total-containers: [8]
|
||||
|
||||
name: runner ${{ matrix.containers }}
|
||||
|
||||
steps:
|
||||
- name: Restore context
|
||||
uses: buildjet/cache/restore@e376f15c6ec6dc595375c78633174c7e5f92dc0e # v3
|
||||
uses: buildjet/cache/restore@v4
|
||||
with:
|
||||
fail-on-cache-miss: true
|
||||
key: cypress-context-${{ github.run_id }}
|
||||
path: ./
|
||||
|
||||
- name: Set up node ${{ needs.init.outputs.nodeVersion }}
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
|
||||
with:
|
||||
node-version: ${{ needs.init.outputs.nodeVersion }}
|
||||
|
||||
- name: Set up npm ${{ needs.init.outputs.npmVersion }}
|
||||
run: npm i -g 'npm@${{ needs.init.outputs.npmVersion }}'
|
||||
|
||||
- name: Install cypress
|
||||
run: ./node_modules/cypress/bin/cypress install
|
||||
|
||||
- name: Run ${{ matrix.containers == 'component' && 'component' || 'E2E' }} cypress tests
|
||||
uses: cypress-io/github-action@8d3918616d8ac34caa2b49afc8b408b6a872a6f5 # v6.7.1
|
||||
uses: cypress-io/github-action@496e7dc0edc421a9de8a36a31c793340e00c61bf # v6.7.5
|
||||
with:
|
||||
# We already installed the dependencies in the init job
|
||||
install: false
|
||||
component: ${{ matrix.containers == 'component' }}
|
||||
group: ${{ matrix.use-cypress-cloud && matrix.containers == 'component' && 'Run component' || matrix.use-cypress-cloud && 'Run E2E' || '' }}
|
||||
# cypress env
|
||||
|
|
@ -130,7 +143,7 @@ jobs:
|
|||
SPLIT_INDEX: ${{ matrix.containers == 'component' && 0 || matrix.containers }}
|
||||
|
||||
- name: Upload snapshots
|
||||
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
|
||||
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
|
||||
if: always()
|
||||
with:
|
||||
name: snapshots_${{ matrix.containers }}
|
||||
|
|
@ -141,7 +154,7 @@ jobs:
|
|||
run: docker logs nextcloud-cypress-tests-${{ env.APP_NAME }} > nextcloud.log
|
||||
|
||||
- name: Upload NC logs
|
||||
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
|
||||
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
|
||||
if: failure() && matrix.containers != 'component'
|
||||
with:
|
||||
name: nc_logs_${{ matrix.containers }}
|
||||
|
|
@ -152,7 +165,7 @@ jobs:
|
|||
run: docker exec nextcloud-cypress-tests-server tar -cvjf - data > data.tar
|
||||
|
||||
- name: Upload data dir archive
|
||||
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
|
||||
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
|
||||
if: failure() && matrix.containers != 'component'
|
||||
with:
|
||||
name: nc_data_${{ matrix.containers }}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,12 @@ jobs:
|
|||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- name: Disabled on forks
|
||||
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
|
||||
run: |
|
||||
echo 'Can not approve PRs from forks'
|
||||
exit 1
|
||||
|
||||
# GitHub actions bot approve
|
||||
- uses: hmarr/auto-approve-action@b40d6c9ed2fa10c9a2749eca7eb004418a705501 # v2
|
||||
with:
|
||||
|
|
|
|||
4
.github/workflows/files-external-ftp.yml
vendored
4
.github/workflows/files-external-ftp.yml
vendored
|
|
@ -68,7 +68,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@2e947f1f6932d141d076ca441d0e1e881775e95b #v2.31.0
|
||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
||||
|
|
@ -100,7 +100,7 @@ jobs:
|
|||
|
||||
- name: Upload code coverage
|
||||
if: ${{ !cancelled() && matrix.coverage }}
|
||||
uses: codecov/codecov-action@v4.1.1
|
||||
uses: codecov/codecov-action@v4.5.0
|
||||
with:
|
||||
files: ./clover.xml
|
||||
flags: phpunit-files-external-ftp
|
||||
|
|
|
|||
10
.github/workflows/files-external-s3.yml
vendored
10
.github/workflows/files-external-s3.yml
vendored
|
|
@ -65,7 +65,7 @@ jobs:
|
|||
submodules: true
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b #v2.31.0
|
||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
||||
|
|
@ -98,7 +98,7 @@ jobs:
|
|||
|
||||
- name: Upload code coverage
|
||||
if: ${{ !cancelled() && matrix.coverage }}
|
||||
uses: codecov/codecov-action@v4.1.1
|
||||
uses: codecov/codecov-action@v4.5.0
|
||||
with:
|
||||
files: ./clover.xml
|
||||
flags: phpunit-files-external-s3
|
||||
|
|
@ -140,7 +140,7 @@ jobs:
|
|||
submodules: true
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b #v2.31.0
|
||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
||||
|
|
@ -165,7 +165,7 @@ jobs:
|
|||
|
||||
- name: Upload code coverage
|
||||
if: ${{ !cancelled() && matrix.coverage }}
|
||||
uses: codecov/codecov-action@v4.1.1
|
||||
uses: codecov/codecov-action@v4.5.0
|
||||
with:
|
||||
files: ./clover.xml
|
||||
flags: phpunit-files-external-s3
|
||||
|
|
@ -184,4 +184,4 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Summary status
|
||||
run: if ${{ needs.changes.outputs.src != 'false' && needs.files-external-s3-minio.result != 'success' && needs.files-external-s3-localstack.result != 'success' }}; then exit 1; fi
|
||||
run: if ${{ needs.changes.outputs.src != 'false' && (needs.files-external-s3-minio.result != 'success' || needs.files-external-s3-localstack.result != 'success') }}; then exit 1; fi
|
||||
|
|
|
|||
4
.github/workflows/files-external-sftp.yml
vendored
4
.github/workflows/files-external-sftp.yml
vendored
|
|
@ -64,7 +64,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@2e947f1f6932d141d076ca441d0e1e881775e95b #v2.31.0
|
||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
||||
|
|
@ -89,7 +89,7 @@ jobs:
|
|||
|
||||
- name: Upload code coverage
|
||||
if: ${{ !cancelled() && matrix.coverage }}
|
||||
uses: codecov/codecov-action@v4.1.1
|
||||
uses: codecov/codecov-action@v4.5.0
|
||||
with:
|
||||
files: ./clover.xml
|
||||
flags: phpunit-files-external-sftp
|
||||
|
|
|
|||
4
.github/workflows/files-external-smb.yml
vendored
4
.github/workflows/files-external-smb.yml
vendored
|
|
@ -61,7 +61,7 @@ jobs:
|
|||
submodules: true
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b #v2.31.0
|
||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
||||
|
|
@ -94,7 +94,7 @@ jobs:
|
|||
|
||||
- name: Upload code coverage
|
||||
if: ${{ !cancelled() && matrix.coverage }}
|
||||
uses: codecov/codecov-action@c16abc29c95fcf9174b58eb7e1abf4c866893bc8 # v4.1.1
|
||||
uses: codecov/codecov-action@4b21c320b5517fc6ffd4406a28e66325c721dc20 # v4.1.1
|
||||
with:
|
||||
files: ./clover.xml
|
||||
flags: phpunit-files-external-smb
|
||||
|
|
|
|||
4
.github/workflows/files-external-webdav.yml
vendored
4
.github/workflows/files-external-webdav.yml
vendored
|
|
@ -61,7 +61,7 @@ jobs:
|
|||
submodules: true
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b #v2.31.0
|
||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
||||
|
|
@ -91,7 +91,7 @@ jobs:
|
|||
|
||||
- name: Upload code coverage
|
||||
if: ${{ !cancelled() && matrix.coverage }}
|
||||
uses: codecov/codecov-action@c16abc29c95fcf9174b58eb7e1abf4c866893bc8 # v4.1.1
|
||||
uses: codecov/codecov-action@4b21c320b5517fc6ffd4406a28e66325c721dc20 # v4.1.1
|
||||
with:
|
||||
files: ./clover.xml
|
||||
flags: phpunit-files-external-webdav
|
||||
|
|
|
|||
4
.github/workflows/files-external.yml
vendored
4
.github/workflows/files-external.yml
vendored
|
|
@ -54,7 +54,7 @@ jobs:
|
|||
submodules: true
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b #v2.31.0
|
||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
||||
|
|
@ -79,7 +79,7 @@ jobs:
|
|||
|
||||
- name: Upload code coverage
|
||||
if: ${{ !cancelled() && matrix.coverage }}
|
||||
uses: codecov/codecov-action@v4.1.1
|
||||
uses: codecov/codecov-action@v4.5.0
|
||||
with:
|
||||
files: ./clover.xml
|
||||
flags: phpunit-files-external-generic
|
||||
|
|
|
|||
4
.github/workflows/integration-dav.yml
vendored
4
.github/workflows/integration-dav.yml
vendored
|
|
@ -43,7 +43,7 @@ jobs:
|
|||
# do not stop on another job's failure
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php-versions: ['8.3']
|
||||
php-versions: ['8.1']
|
||||
endpoint: ['old', 'new']
|
||||
service: ['CalDAV', 'CardDAV']
|
||||
|
||||
|
|
@ -56,7 +56,7 @@ jobs:
|
|||
submodules: true
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b #v2.31.0
|
||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
||||
|
|
|
|||
4
.github/workflows/integration-litmus.yml
vendored
4
.github/workflows/integration-litmus.yml
vendored
|
|
@ -43,7 +43,7 @@ jobs:
|
|||
# do not stop on another job's failure
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php-versions: ['8.3']
|
||||
php-versions: ['8.1']
|
||||
endpoint: ['webdav', 'dav']
|
||||
|
||||
name: Litmus WebDAV ${{ matrix.endpoint }}
|
||||
|
|
@ -55,7 +55,7 @@ jobs:
|
|||
submodules: true
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b #v2.31.0
|
||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
||||
|
|
|
|||
2
.github/workflows/integration-s3-primary.yml
vendored
2
.github/workflows/integration-s3-primary.yml
vendored
|
|
@ -70,7 +70,7 @@ jobs:
|
|||
submodules: true
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b #v2.31.0
|
||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
||||
|
|
|
|||
5
.github/workflows/integration-sqlite.yml
vendored
5
.github/workflows/integration-sqlite.yml
vendored
|
|
@ -41,6 +41,7 @@ jobs:
|
|||
- '.php-cs-fixer.dist.php'
|
||||
- 'composer.json'
|
||||
- 'composer.lock'
|
||||
- 'core/shipped.json'
|
||||
|
||||
integration-sqlite:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
@ -69,7 +70,7 @@ jobs:
|
|||
- 'sharing_features'
|
||||
- 'videoverification_features'
|
||||
|
||||
php-versions: ['8.2']
|
||||
php-versions: ['8.1']
|
||||
spreed-versions: ['main']
|
||||
|
||||
services:
|
||||
|
|
@ -103,7 +104,7 @@ jobs:
|
|||
ref: ${{ matrix.spreed-versions }}
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b #v2.31.0
|
||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
||||
|
|
|
|||
2
.github/workflows/lint-eslint.yml
vendored
2
.github/workflows/lint-eslint.yml
vendored
|
|
@ -63,7 +63,7 @@ jobs:
|
|||
fallbackNpm: '^10'
|
||||
|
||||
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v3
|
||||
with:
|
||||
node-version: ${{ steps.versions.outputs.nodeVersion }}
|
||||
|
||||
|
|
|
|||
2
.github/workflows/lint-php-cs.yml
vendored
2
.github/workflows/lint-php-cs.yml
vendored
|
|
@ -51,7 +51,7 @@ jobs:
|
|||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||
|
||||
- name: Set up php8.1
|
||||
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b #v2.31.0
|
||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
|
||||
with:
|
||||
php-version: 8.1
|
||||
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
.github/workflows/lint-php.yml
vendored
2
.github/workflows/lint-php.yml
vendored
|
|
@ -56,7 +56,7 @@ jobs:
|
|||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b #v2.31.0
|
||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
coverage: none
|
||||
|
|
|
|||
10
.github/workflows/node-test.yml
vendored
10
.github/workflows/node-test.yml
vendored
|
|
@ -83,7 +83,7 @@ jobs:
|
|||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||
|
||||
- name: Set up node ${{ needs.versions.outputs.nodeVersion }}
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
|
||||
with:
|
||||
node-version: ${{ needs.versions.outputs.nodeVersion }}
|
||||
|
||||
|
|
@ -99,7 +99,7 @@ jobs:
|
|||
run: npm run test:coverage --if-present
|
||||
|
||||
- name: Collect coverage
|
||||
uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be # v4.3.1
|
||||
uses: codecov/codecov-action@4b21c320b5517fc6ffd4406a28e66325c721dc20 # v4.3.1
|
||||
with:
|
||||
files: ./coverage/lcov.info
|
||||
|
||||
|
|
@ -117,7 +117,7 @@ jobs:
|
|||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||
|
||||
- name: Set up node ${{ needs.versions.outputs.nodeVersion }}
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
|
||||
with:
|
||||
node-version: ${{ needs.versions.outputs.nodeVersion }}
|
||||
|
||||
|
|
@ -145,7 +145,7 @@ jobs:
|
|||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||
|
||||
- name: Set up node ${{ needs.versions.outputs.nodeVersion }}
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
|
||||
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
|
||||
with:
|
||||
node-version: ${{ needs.versions.outputs.nodeVersion }}
|
||||
|
||||
|
|
@ -170,4 +170,4 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Summary status
|
||||
run: if ${{ needs.changes.outputs.src != 'false' && needs.test.result != 'success' && needs.jsunit.result != 'success' && needs.handlebars.result != 'success' }}; then exit 1; fi
|
||||
run: if ${{ needs.changes.outputs.src != 'false' && (needs.test.result != 'success' || needs.jsunit.result != 'success' || needs.handlebars.result != 'success') }}; then exit 1; fi
|
||||
|
|
|
|||
3
.github/workflows/node.yml
vendored
3
.github/workflows/node.yml
vendored
|
|
@ -42,6 +42,7 @@ jobs:
|
|||
- '**.vue'
|
||||
- 'core/css/*'
|
||||
- 'core/img/**'
|
||||
- 'version.php'
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
@ -62,7 +63,7 @@ jobs:
|
|||
fallbackNpm: '^10'
|
||||
|
||||
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v3
|
||||
with:
|
||||
node-version: ${{ steps.versions.outputs.nodeVersion }}
|
||||
|
||||
|
|
|
|||
4
.github/workflows/npm-audit-fix.yml
vendored
4
.github/workflows/npm-audit-fix.yml
vendored
|
|
@ -21,7 +21,7 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
branches: ['main', 'master', 'stable29', 'stable28', 'stable27']
|
||||
branches: ['main', 'master', 'stable30', 'stable29', 'stable28']
|
||||
|
||||
name: npm-audit-fix-${{ matrix.branches }}
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ jobs:
|
|||
fallbackNpm: '^10'
|
||||
|
||||
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
|
||||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v3
|
||||
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v3
|
||||
with:
|
||||
node-version: ${{ steps.versions.outputs.nodeVersion }}
|
||||
|
||||
|
|
|
|||
6
.github/workflows/object-storage-azure.yml
vendored
6
.github/workflows/object-storage-azure.yml
vendored
|
|
@ -45,7 +45,7 @@ jobs:
|
|||
|
||||
strategy:
|
||||
matrix:
|
||||
php-versions: ['8.1', '8.2', '8.3']
|
||||
php-versions: ['8.1', '8.2']
|
||||
include:
|
||||
- php-versions: '8.3'
|
||||
coverage: true
|
||||
|
|
@ -74,7 +74,7 @@ jobs:
|
|||
submodules: true
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b #v2.31.0
|
||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
||||
|
|
@ -105,7 +105,7 @@ jobs:
|
|||
|
||||
- name: Upload code coverage
|
||||
if: ${{ !cancelled() && matrix.coverage }}
|
||||
uses: codecov/codecov-action@v4.1.1
|
||||
uses: codecov/codecov-action@v4.5.0
|
||||
with:
|
||||
files: ./clover.xml
|
||||
flags: phpunit-azure
|
||||
|
|
|
|||
8
.github/workflows/object-storage-s3.yml
vendored
8
.github/workflows/object-storage-s3.yml
vendored
|
|
@ -38,14 +38,14 @@ jobs:
|
|||
- '**.php'
|
||||
|
||||
s3-primary-tests-minio:
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-latest
|
||||
needs: changes
|
||||
|
||||
if: ${{ github.repository_owner != 'nextcloud-gmbh' && needs.changes.outputs.src != 'false' }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
php-versions: ['8.1', '8.2', '8.3']
|
||||
php-versions: ['8.1', '8.2']
|
||||
include:
|
||||
- php-versions: '8.3'
|
||||
coverage: true
|
||||
|
|
@ -75,7 +75,7 @@ jobs:
|
|||
submodules: true
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b #v2.31.0
|
||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
||||
|
|
@ -111,7 +111,7 @@ jobs:
|
|||
|
||||
- name: Upload code coverage
|
||||
if: ${{ !cancelled() && matrix.coverage }}
|
||||
uses: codecov/codecov-action@v4.1.1
|
||||
uses: codecov/codecov-action@v4.5.0
|
||||
with:
|
||||
files: ./clover.xml
|
||||
flags: phpunit-s3
|
||||
|
|
|
|||
6
.github/workflows/object-storage-swift.yml
vendored
6
.github/workflows/object-storage-swift.yml
vendored
|
|
@ -45,7 +45,7 @@ jobs:
|
|||
|
||||
strategy:
|
||||
matrix:
|
||||
php-versions: ['8.1', '8.2', '8.3']
|
||||
php-versions: ['8.1', '8.2']
|
||||
include:
|
||||
- php-versions: '8.3'
|
||||
coverage: true
|
||||
|
|
@ -72,7 +72,7 @@ jobs:
|
|||
submodules: true
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b #v2.31.0
|
||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
||||
|
|
@ -101,7 +101,7 @@ jobs:
|
|||
|
||||
- name: Upload code coverage
|
||||
if: ${{ !cancelled() && matrix.coverage }}
|
||||
uses: codecov/codecov-action@v4.1.1
|
||||
uses: codecov/codecov-action@v4.5.0
|
||||
with:
|
||||
files: ./clover.xml
|
||||
flags: phpunit-swift
|
||||
|
|
|
|||
4
.github/workflows/openapi.yml
vendored
4
.github/workflows/openapi.yml
vendored
|
|
@ -29,9 +29,9 @@ jobs:
|
|||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||
|
||||
- name: Set up php
|
||||
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b #v2.31.0
|
||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
|
||||
with:
|
||||
php-version: '8.2'
|
||||
php-version: '8.1'
|
||||
extensions: ctype, curl, dom, fileinfo, gd, json, libxml, mbstring, openssl, pcntl, pdo, posix, session, simplexml, xml, xmlreader, xmlwriter, zip, zlib
|
||||
coverage: none
|
||||
ini-file: development
|
||||
|
|
|
|||
10
.github/workflows/performance.yml
vendored
10
.github/workflows/performance.yml
vendored
|
|
@ -22,6 +22,12 @@ jobs:
|
|||
name: performance-${{ matrix.php-versions }}
|
||||
|
||||
steps:
|
||||
- name: Disabled on forks
|
||||
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
|
||||
run: |
|
||||
echo 'Can not run performance tests on forks'
|
||||
exit 1
|
||||
|
||||
- name: Checkout server before PR
|
||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
|
||||
with:
|
||||
|
|
@ -29,7 +35,7 @@ jobs:
|
|||
ref: ${{ github.event.pull_request.base.ref }}
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b #v2.31.0
|
||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
extensions: mbstring, fileinfo, intl, sqlite, pdo_sqlite, zip, gd
|
||||
|
|
@ -85,7 +91,7 @@ jobs:
|
|||
|
||||
- name: Upload profiles
|
||||
if: always()
|
||||
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
|
||||
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874
|
||||
with:
|
||||
name: profiles
|
||||
path: |
|
||||
|
|
|
|||
2
.github/workflows/phpunit-32bits.yml
vendored
2
.github/workflows/phpunit-32bits.yml
vendored
|
|
@ -42,7 +42,7 @@ jobs:
|
|||
sudo apt-get install -y ffmpeg imagemagick libmagickcore-6.q16-3-extra
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b #v2.31.0
|
||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
extensions: ctype, curl, dom, fileinfo, gd, imagick, intl, json, mbstring, openssl, pdo_sqlite, posix, sqlite, xml, zip, apcu
|
||||
|
|
|
|||
4
.github/workflows/phpunit-mariadb.yml
vendored
4
.github/workflows/phpunit-mariadb.yml
vendored
|
|
@ -89,7 +89,7 @@ jobs:
|
|||
submodules: true
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b #v2.31.0
|
||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
||||
|
|
@ -122,7 +122,7 @@ jobs:
|
|||
|
||||
- name: Upload db code coverage
|
||||
if: ${{ !cancelled() && matrix.coverage }}
|
||||
uses: codecov/codecov-action@v4.1.1
|
||||
uses: codecov/codecov-action@v4.5.0
|
||||
with:
|
||||
files: ./clover.db.xml
|
||||
flags: phpunit-mariadb
|
||||
|
|
|
|||
6
.github/workflows/phpunit-memcached.yml
vendored
6
.github/workflows/phpunit-memcached.yml
vendored
|
|
@ -55,7 +55,7 @@ jobs:
|
|||
|
||||
strategy:
|
||||
matrix:
|
||||
php-versions: ['8.1', '8.2', '8.3']
|
||||
php-versions: ['8.1', '8.3']
|
||||
include:
|
||||
- php-versions: '8.2'
|
||||
coverage: ${{ github.event_name != 'pull_request' }}
|
||||
|
|
@ -76,7 +76,7 @@ jobs:
|
|||
submodules: true
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b #v2.31.0
|
||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
||||
|
|
@ -101,7 +101,7 @@ jobs:
|
|||
|
||||
- name: Upload code coverage
|
||||
if: ${{ !cancelled() && matrix.coverage }}
|
||||
uses: codecov/codecov-action@v4.1.1
|
||||
uses: codecov/codecov-action@v4.5.0
|
||||
with:
|
||||
files: ./clover.xml
|
||||
flags: phpunit-memcached
|
||||
|
|
|
|||
184
.github/workflows/phpunit-mysql-sharding.yml
vendored
Normal file
184
.github/workflows/phpunit-mysql-sharding.yml
vendored
Normal file
|
|
@ -0,0 +1,184 @@
|
|||
# This workflow is provided via the organization template repository
|
||||
#
|
||||
# https://github.com/nextcloud/.github
|
||||
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
name: PHPUnit sharding
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
schedule:
|
||||
- cron: "5 2 * * *"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: phpunit-mysql-sharding-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
changes:
|
||||
runs-on: ubuntu-latest-low
|
||||
|
||||
outputs:
|
||||
src: ${{ steps.changes.outputs.src }}
|
||||
|
||||
steps:
|
||||
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
|
||||
id: changes
|
||||
continue-on-error: true
|
||||
with:
|
||||
filters: |
|
||||
src:
|
||||
- '.github/workflows/**'
|
||||
- '3rdparty/**'
|
||||
- '**/appinfo/**'
|
||||
- '**/lib/**'
|
||||
- '**/templates/**'
|
||||
- '**/tests/**'
|
||||
- 'vendor/**'
|
||||
- 'vendor-bin/**'
|
||||
- '.php-cs-fixer.dist.php'
|
||||
- 'composer.json'
|
||||
- 'composer.lock'
|
||||
- '**.php'
|
||||
|
||||
phpunit-mysql:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
needs: changes
|
||||
if: needs.changes.outputs.src != 'false'
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
php-versions: ['8.1']
|
||||
mysql-versions: ['8.4']
|
||||
|
||||
name: Sharding - MySQL ${{ matrix.mysql-versions }} (PHP ${{ matrix.php-versions }}) - database tests
|
||||
|
||||
services:
|
||||
cache:
|
||||
image: ghcr.io/nextcloud/continuous-integration-redis:latest
|
||||
ports:
|
||||
- 6379:6379/tcp
|
||||
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
||||
|
||||
mysql:
|
||||
image: ghcr.io/nextcloud/continuous-integration-mysql-${{ matrix.mysql-versions }}:latest
|
||||
ports:
|
||||
- 4444:3306/tcp
|
||||
env:
|
||||
MYSQL_ROOT_PASSWORD: rootpassword
|
||||
MYSQL_USER: oc_autotest
|
||||
MYSQL_PASSWORD: nextcloud
|
||||
MYSQL_DATABASE: oc_autotest
|
||||
options: --health-cmd="mysqladmin ping" --health-interval 5s --health-timeout 2s --health-retries 10
|
||||
shard1:
|
||||
image: ghcr.io/nextcloud/continuous-integration-mysql-${{ matrix.mysql-versions }}:latest
|
||||
ports:
|
||||
- 5001:3306/tcp
|
||||
env:
|
||||
MYSQL_ROOT_PASSWORD: rootpassword
|
||||
MYSQL_USER: oc_autotest
|
||||
MYSQL_PASSWORD: nextcloud
|
||||
MYSQL_DATABASE: nextcloud
|
||||
options: --health-cmd="mysqladmin ping" --health-interval 5s --health-timeout 2s --health-retries 10
|
||||
shard2:
|
||||
image: ghcr.io/nextcloud/continuous-integration-mysql-${{ matrix.mysql-versions }}:latest
|
||||
ports:
|
||||
- 5002:3306/tcp
|
||||
env:
|
||||
MYSQL_ROOT_PASSWORD: rootpassword
|
||||
MYSQL_USER: oc_autotest
|
||||
MYSQL_PASSWORD: nextcloud
|
||||
MYSQL_DATABASE: nextcloud
|
||||
options: --health-cmd="mysqladmin ping" --health-interval 5s --health-timeout 2s --health-retries 10
|
||||
shard3:
|
||||
image: ghcr.io/nextcloud/continuous-integration-mysql-${{ matrix.mysql-versions }}:latest
|
||||
ports:
|
||||
- 5003:3306/tcp
|
||||
env:
|
||||
MYSQL_ROOT_PASSWORD: rootpassword
|
||||
MYSQL_USER: oc_autotest
|
||||
MYSQL_PASSWORD: nextcloud
|
||||
MYSQL_DATABASE: nextcloud
|
||||
options: --health-cmd="mysqladmin ping" --health-interval 5s --health-timeout 2s --health-retries 10
|
||||
shard4:
|
||||
image: ghcr.io/nextcloud/continuous-integration-mysql-${{ matrix.mysql-versions }}:latest
|
||||
ports:
|
||||
- 5004:3306/tcp
|
||||
env:
|
||||
MYSQL_ROOT_PASSWORD: rootpassword
|
||||
MYSQL_USER: oc_autotest
|
||||
MYSQL_PASSWORD: nextcloud
|
||||
MYSQL_DATABASE: nextcloud
|
||||
options: --health-cmd="mysqladmin ping" --health-interval 5s --health-timeout 2s --health-retries 10
|
||||
|
||||
steps:
|
||||
- name: Checkout server
|
||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
||||
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, redis, session, simplexml, xmlreader, xmlwriter, zip, zlib, mysql, pdo_mysql
|
||||
coverage: ${{ matrix.coverage && 'xdebug' || 'none' }}
|
||||
ini-file: development
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Set up dependencies
|
||||
run: composer i
|
||||
|
||||
- name: Enable ONLY_FULL_GROUP_BY MySQL option
|
||||
run: |
|
||||
echo "SET GLOBAL sql_mode=(SELECT CONCAT(@@sql_mode,',ONLY_FULL_GROUP_BY'));" | mysql -h 127.0.0.1 -P 4444 -u root -prootpassword
|
||||
echo "SELECT @@sql_mode;" | mysql -h 127.0.0.1 -P 4444 -u root -prootpassword
|
||||
|
||||
- name: Set up Nextcloud
|
||||
env:
|
||||
DB_PORT: 4444
|
||||
SHARDING: 1
|
||||
run: |
|
||||
mkdir data
|
||||
cp tests/redis.config.php config/
|
||||
cp tests/preseed-config.php config/config.php
|
||||
./occ maintenance:install --verbose --database=mysql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin
|
||||
php -f tests/enable_all.php | grep -i -C9999 error && echo "Error during app setup" && exit 1 || exit 0
|
||||
|
||||
- name: PHPUnit
|
||||
run: composer run test:db ${{ matrix.coverage && ' -- --coverage-clover ./clover.db.xml' || '' }}
|
||||
|
||||
- name: Upload db code coverage
|
||||
if: ${{ !cancelled() && matrix.coverage }}
|
||||
uses: codecov/codecov-action@v4.5.0
|
||||
with:
|
||||
files: ./clover.db.xml
|
||||
flags: phpunit-mysql
|
||||
|
||||
- name: Print logs
|
||||
if: always()
|
||||
run: |
|
||||
cat data/nextcloud.log
|
||||
|
||||
summary:
|
||||
permissions:
|
||||
contents: none
|
||||
runs-on: ubuntu-latest-low
|
||||
needs: [changes, phpunit-mysql]
|
||||
|
||||
if: always()
|
||||
|
||||
name: phpunit-mysql-summary
|
||||
|
||||
steps:
|
||||
- name: Summary status
|
||||
run: if ${{ needs.changes.outputs.src != 'false' && needs.phpunit-mysql.result != 'success' }}; then exit 1; fi
|
||||
4
.github/workflows/phpunit-mysql.yml
vendored
4
.github/workflows/phpunit-mysql.yml
vendored
|
|
@ -89,7 +89,7 @@ jobs:
|
|||
submodules: true
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b #v2.31.0
|
||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
||||
|
|
@ -122,7 +122,7 @@ jobs:
|
|||
|
||||
- name: Upload db code coverage
|
||||
if: ${{ !cancelled() && matrix.coverage }}
|
||||
uses: codecov/codecov-action@v4.1.1
|
||||
uses: codecov/codecov-action@v4.5.0
|
||||
with:
|
||||
files: ./clover.db.xml
|
||||
flags: phpunit-mysql
|
||||
|
|
|
|||
6
.github/workflows/phpunit-nodb.yml
vendored
6
.github/workflows/phpunit-nodb.yml
vendored
|
|
@ -57,7 +57,7 @@ jobs:
|
|||
|
||||
strategy:
|
||||
matrix:
|
||||
php-versions: ['8.1', '8.2', '8.3']
|
||||
php-versions: ['8.1', '8.3']
|
||||
include:
|
||||
- php-versions: '8.2'
|
||||
coverage: ${{ github.event_name != 'pull_request' }}
|
||||
|
|
@ -78,7 +78,7 @@ jobs:
|
|||
submodules: true
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b #v2.31.0
|
||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
||||
|
|
@ -106,7 +106,7 @@ jobs:
|
|||
|
||||
- name: Upload nodb code coverage
|
||||
if: ${{ !cancelled() && matrix.coverage }}
|
||||
uses: codecov/codecov-action@v4.1.1
|
||||
uses: codecov/codecov-action@v4.5.0
|
||||
with:
|
||||
files: ./clover.nodb.xml
|
||||
flags: phpunit-nodb
|
||||
|
|
|
|||
34
.github/workflows/phpunit-oci.yml
vendored
34
.github/workflows/phpunit-oci.yml
vendored
|
|
@ -51,15 +51,21 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
|
||||
needs: changes
|
||||
if: needs.changes.outputs.src != 'false' && ${{ github.repository_owner != 'nextcloud-gmbh' }}
|
||||
if: ${{ needs.changes.outputs.src != 'false' && github.repository_owner != 'nextcloud-gmbh' }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
oracle-versions: ['11']
|
||||
php-versions: ['8.1', '8.2', '8.3']
|
||||
include:
|
||||
- php-versions: '8.3'
|
||||
- oracle-versions: '11'
|
||||
php-versions: '8.1'
|
||||
- oracle-versions: '18'
|
||||
php-versions: '8.1'
|
||||
coverage: ${{ github.event_name != 'pull_request' }}
|
||||
- oracle-versions: '21'
|
||||
php-versions: '8.2'
|
||||
- oracle-versions: '23'
|
||||
php-versions: '8.3'
|
||||
|
||||
name: Oracle ${{ matrix.oracle-versions }} (PHP ${{ matrix.php-versions }}) - database tests
|
||||
|
||||
|
|
@ -71,23 +77,21 @@ jobs:
|
|||
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
||||
|
||||
oracle:
|
||||
image: ghcr.io/gvenzl/oracle-xe:${{ matrix.oracle-versions }}
|
||||
image: ghcr.io/gvenzl/oracle-${{ matrix.oracle-versions < 23 && 'xe' || 'free' }}:${{ matrix.oracle-versions }}
|
||||
|
||||
# Provide passwords and other environment variables to container
|
||||
env:
|
||||
ORACLE_RANDOM_PASSWORD: true
|
||||
APP_USER: oc_autotest
|
||||
APP_USER_PASSWORD: nextcloud
|
||||
ORACLE_PASSWORD: oracle
|
||||
|
||||
# Forward Oracle port
|
||||
ports:
|
||||
- 4444:1521/tcp
|
||||
- 1521:1521
|
||||
|
||||
# Provide healthcheck script options for startup
|
||||
options: >-
|
||||
--health-cmd healthcheck.sh
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-interval 20s
|
||||
--health-timeout 10s
|
||||
--health-retries 10
|
||||
|
||||
steps:
|
||||
|
|
@ -97,7 +101,7 @@ jobs:
|
|||
submodules: true
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b #v2.31.0
|
||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
||||
|
|
@ -111,13 +115,11 @@ jobs:
|
|||
run: composer i
|
||||
|
||||
- name: Set up Nextcloud
|
||||
env:
|
||||
DB_PORT: 4444
|
||||
run: |
|
||||
mkdir data
|
||||
cp tests/redis.config.php config/
|
||||
cp tests/preseed-config.php config/config.php
|
||||
./occ maintenance:install --verbose --database=oci --database-name=XE --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=oc_autotest --database-pass=nextcloud --admin-user admin --admin-pass admin
|
||||
./occ maintenance:install --verbose --database=oci --database-name=${{ matrix.oracle-versions < 23 && 'XE' || 'FREE' }} --database-host=127.0.0.1 --database-port=1521 --database-user=system --database-pass=oracle --admin-user admin --admin-pass admin
|
||||
php -f tests/enable_all.php | grep -i -C9999 error && echo "Error during app setup" && exit 1 || exit 0
|
||||
|
||||
- name: PHPUnit
|
||||
|
|
@ -125,7 +127,7 @@ jobs:
|
|||
|
||||
- name: Upload db code coverage
|
||||
if: ${{ !cancelled() && matrix.coverage }}
|
||||
uses: codecov/codecov-action@v4.1.1
|
||||
uses: codecov/codecov-action@v4.5.0
|
||||
with:
|
||||
files: ./clover.db.xml
|
||||
flags: phpunit-oci
|
||||
|
|
|
|||
4
.github/workflows/phpunit-pgsql.yml
vendored
4
.github/workflows/phpunit-pgsql.yml
vendored
|
|
@ -89,7 +89,7 @@ jobs:
|
|||
submodules: true
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b #v2.31.0
|
||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
||||
|
|
@ -117,7 +117,7 @@ jobs:
|
|||
|
||||
- name: Upload db code coverage
|
||||
if: ${{ !cancelled() && matrix.coverage }}
|
||||
uses: codecov/codecov-action@v4.1.1
|
||||
uses: codecov/codecov-action@v4.5.0
|
||||
with:
|
||||
files: ./clover.db.xml
|
||||
flags: phpunit-postgres
|
||||
|
|
|
|||
6
.github/workflows/phpunit-sqlite.yml
vendored
6
.github/workflows/phpunit-sqlite.yml
vendored
|
|
@ -55,7 +55,7 @@ jobs:
|
|||
|
||||
strategy:
|
||||
matrix:
|
||||
php-versions: ['8.1', '8.2', '8.3']
|
||||
php-versions: ['8.2', '8.3']
|
||||
include:
|
||||
- php-versions: '8.1'
|
||||
coverage: ${{ github.event_name != 'pull_request' }}
|
||||
|
|
@ -76,7 +76,7 @@ jobs:
|
|||
submodules: true
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b #v2.31.0
|
||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
|
||||
|
|
@ -105,7 +105,7 @@ jobs:
|
|||
|
||||
- name: Upload db code coverage
|
||||
if: ${{ !cancelled() && matrix.coverage }}
|
||||
uses: codecov/codecov-action@v4.1.1
|
||||
uses: codecov/codecov-action@v4.5.0
|
||||
with:
|
||||
files: ./clover.db.xml
|
||||
flags: phpunit-sqlite
|
||||
|
|
|
|||
6
.github/workflows/static-code-analysis.yml
vendored
6
.github/workflows/static-code-analysis.yml
vendored
|
|
@ -22,7 +22,7 @@ jobs:
|
|||
submodules: true
|
||||
|
||||
- name: Set up php
|
||||
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b #v2.31.0
|
||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
|
||||
with:
|
||||
php-version: '8.1'
|
||||
extensions: apcu,ctype,curl,dom,fileinfo,ftp,gd,intl,json,ldap,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
|
||||
|
|
@ -56,7 +56,7 @@ jobs:
|
|||
submodules: true
|
||||
|
||||
- name: Set up php
|
||||
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b #v2.31.0
|
||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
|
||||
with:
|
||||
php-version: '8.1'
|
||||
extensions: ctype,curl,dom,fileinfo,ftp,gd,intl,json,ldap,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
|
||||
|
|
@ -84,7 +84,7 @@ jobs:
|
|||
submodules: true
|
||||
|
||||
- name: Set up php
|
||||
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b #v2.31.0
|
||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
|
||||
with:
|
||||
php-version: '8.1'
|
||||
extensions: ctype,curl,dom,fileinfo,gd,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
|
||||
|
|
|
|||
2
.github/workflows/update-cacert-bundle.yml
vendored
2
.github/workflows/update-cacert-bundle.yml
vendored
|
|
@ -14,7 +14,7 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
branches: ['master', 'stable29', 'stable28', 'stable27', 'stable26', 'stable25', 'stable24', 'stable23', 'stable22']
|
||||
branches: ['master', 'stable30', 'stable29', 'stable28', 'stable27', 'stable26', 'stable25', 'stable24', 'stable23', 'stable22']
|
||||
|
||||
name: update-ca-certificate-bundle-${{ matrix.branches }}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
branches: ['master', 'stable29', 'stable28', 'stable27', 'stable26', 'stable25', 'stable24', 'stable23', 'stable22']
|
||||
branches: ['master', 'stable30', 'stable29', 'stable28', 'stable27', 'stable26', 'stable25', 'stable24', 'stable23', 'stable22']
|
||||
|
||||
name: update-code-signing-crl-${{ matrix.branches }}
|
||||
|
||||
|
|
|
|||
52
.github/workflows/update-psalm-baseline-approve-merge.yml
vendored
Normal file
52
.github/workflows/update-psalm-baseline-approve-merge.yml
vendored
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
# SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
name: Auto approve psalm baseline update
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
- stable*
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: update-psalm-baseline-approve-merge-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
auto-approve-merge:
|
||||
if: github.actor == 'nextcloud-command'
|
||||
runs-on: ubuntu-latest-low
|
||||
permissions:
|
||||
# for hmarr/auto-approve-action to approve PRs
|
||||
pull-requests: write
|
||||
# for alexwilson/enable-github-automerge-action to approve PRs
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Disabled on forks
|
||||
if: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
|
||||
run: |
|
||||
echo 'Can not approve PRs from forks'
|
||||
exit 1
|
||||
|
||||
- uses: mdecoleman/pr-branch-name@55795d86b4566d300d237883103f052125cc7508 # v3.0.0
|
||||
id: branchname
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# GitHub actions bot approve
|
||||
- uses: hmarr/auto-approve-action@b40d6c9ed2fa10c9a2749eca7eb004418a705501 # v2
|
||||
if: startsWith(steps.branchname.outputs.branch, 'automated/noid/') && endsWith(steps.branchname.outputs.branch, 'update-psalm-baseline')
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# Enable GitHub auto merge
|
||||
- name: Auto merge
|
||||
uses: alexwilson/enable-github-automerge-action@56e3117d1ae1540309dc8f7a9f2825bc3c5f06ff # main
|
||||
if: startsWith(steps.branchname.outputs.branch, 'automated/noid/') && endsWith(steps.branchname.outputs.branch, 'update-psalm-baseline')
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
4
.github/workflows/update-psalm-baseline.yml
vendored
4
.github/workflows/update-psalm-baseline.yml
vendored
|
|
@ -16,7 +16,7 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
branches: ['master', 'stable29', 'stable28', 'stable27']
|
||||
branches: ['master', 'stable30', 'stable29', 'stable28']
|
||||
|
||||
name: update-psalm-baseline-${{ matrix.branches }}
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ jobs:
|
|||
submodules: true
|
||||
|
||||
- name: Set up php
|
||||
uses: shivammathur/setup-php@2e947f1f6932d141d076ca441d0e1e881775e95b #v2.31.0
|
||||
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
|
||||
with:
|
||||
php-version: '8.1'
|
||||
extensions: apcu,ctype,curl,dom,fileinfo,ftp,gd,intl,json,ldap,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
|
||||
|
|
|
|||
14
.htaccess
14
.htaccess
|
|
@ -40,7 +40,7 @@
|
|||
</IfModule>
|
||||
|
||||
# Add cache control for static resources
|
||||
<FilesMatch "\.(css|js|mjs|svg|gif|png|jpg|ico|wasm|tflite)$">
|
||||
<FilesMatch "\.(css|js|mjs|svg|gif|png|jpg|webp|ico|wasm|tflite)$">
|
||||
<If "%{QUERY_STRING} =~ /(^|&)v=/">
|
||||
Header set Cache-Control "max-age=15778463, immutable"
|
||||
</If>
|
||||
|
|
@ -49,8 +49,8 @@
|
|||
</Else>
|
||||
</FilesMatch>
|
||||
|
||||
# Let browsers cache WOFF files for a week
|
||||
<FilesMatch "\.woff2?$">
|
||||
# Let browsers cache OTF and WOFF files for a week
|
||||
<FilesMatch "\.(otf|woff2?)$">
|
||||
Header set Cache-Control "max-age=604800"
|
||||
</FilesMatch>
|
||||
</IfModule>
|
||||
|
|
@ -106,5 +106,13 @@
|
|||
SetEnvIf Transfer-Encoding "chunked" proxy-sendcl=1
|
||||
</IfModule>
|
||||
|
||||
# Apache disabled the sending of the server-side content-length header
|
||||
# in their 2.4.59 patch updated which breaks some use-cases in Nextcloud.
|
||||
# Setting ap_trust_cgilike_cl allows to bring back the usual behaviour.
|
||||
# See https://bz.apache.org/bugzilla/show_bug.cgi?id=68973
|
||||
<IfModule mod_env.c>
|
||||
SetEnv ap_trust_cgilike_cl
|
||||
</IfModule>
|
||||
|
||||
AddDefaultCharset utf-8
|
||||
Options -Indexes
|
||||
|
|
|
|||
|
|
@ -14,29 +14,23 @@ $config = new Config();
|
|||
$config
|
||||
->setParallelConfig(ParallelConfigFactory::detect())
|
||||
->getFinder()
|
||||
->ignoreVCSIgnored(true)
|
||||
->exclude('config')
|
||||
->exclude('data')
|
||||
->notPath('3rdparty')
|
||||
->notPath('build/integration/vendor')
|
||||
->notPath('build/lib')
|
||||
->notPath('build/node_modules')
|
||||
->notPath('build/stubs')
|
||||
->notPath('composer')
|
||||
->notPath('node_modules')
|
||||
->notPath('vendor')
|
||||
->in('apps')
|
||||
->exclude('3rdparty')
|
||||
->exclude('build/stubs')
|
||||
->exclude('composer')
|
||||
->in(__DIR__);
|
||||
|
||||
// Ignore additional app directories
|
||||
$rootDir = new \DirectoryIterator(__DIR__);
|
||||
foreach ($rootDir as $node) {
|
||||
if (str_starts_with($node->getFilename(), 'apps')) {
|
||||
$return = shell_exec('git check-ignore ' . escapeshellarg($node->getFilename() . '/'));
|
||||
$ignoredEntries = shell_exec('git status --porcelain --ignored ' . escapeshellarg(__DIR__));
|
||||
$ignoredEntries = explode("\n", $ignoredEntries);
|
||||
$ignoredEntries = array_filter($ignoredEntries, static fn (string $line) => str_starts_with($line, '!! '));
|
||||
$ignoredEntries = array_map(static fn (string $line) => substr($line, 3), $ignoredEntries);
|
||||
$ignoredEntries = array_values($ignoredEntries);
|
||||
|
||||
if ($return !== null) {
|
||||
$config->getFinder()->exclude($node->getFilename());
|
||||
}
|
||||
foreach ($ignoredEntries as $ignoredEntry) {
|
||||
if (str_ends_with($ignoredEntry, '/')) {
|
||||
$config->getFinder()->exclude($ignoredEntry);
|
||||
} else {
|
||||
$config->getFinder()->notPath($ignoredEntry);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
24
.reuse/dep5
24
.reuse/dep5
File diff suppressed because one or more lines are too long
|
|
@ -176,6 +176,12 @@ source_file = translationfiles/templates/weather_status.pot
|
|||
source_lang = en
|
||||
type = PO
|
||||
|
||||
[o:nextcloud:p:nextcloud:r:webhook_listeners]
|
||||
file_filter = translationfiles/<lang>/webhook_listeners.po
|
||||
source_file = translationfiles/templates/webhook_listeners.pot
|
||||
source_lang = en
|
||||
type = PO
|
||||
|
||||
[o:nextcloud:p:nextcloud:r:workflowengine]
|
||||
file_filter = translationfiles/<lang>/workflowengine.po
|
||||
source_file = translationfiles/templates/workflowengine.pot
|
||||
|
|
|
|||
2
3rdparty
2
3rdparty
|
|
@ -1 +1 @@
|
|||
Subproject commit 72598ddd873afd5643d62ddfc4d962d04b2b4519
|
||||
Subproject commit 9e4e23d28d717e08f2b14ac6aa19d0bec25f6be1
|
||||
|
|
@ -6,4 +6,4 @@ and our products: “Nextcloud Files”; “Nextcloud Groupware” and “Nextcl
|
|||
This set of marks is collectively referred to as the “Nextcloud marks.”
|
||||
|
||||
Use of Nextcloud logos and other marks is only permitted under the guidelines provided by the Nextcloud GmbH.
|
||||
A copy can be found at https://discord.com/branding
|
||||
A copy can be found at https://nextcloud.com/trademarks/
|
||||
|
|
|
|||
11
README.md
11
README.md
|
|
@ -74,18 +74,21 @@ Otherwise, git checkouts can be handled the same as release archives, by using t
|
|||
|
||||
- Comment on a pull request with `/update-3rdparty` to update the 3rd party submodule. It will update to the last commit of the 3rd party branch named like the PR target.
|
||||
|
||||
#### Ignore code style updates in git blame
|
||||
|
||||
`git config blame.ignoreRevsFile .git-blame-ignore-revs`
|
||||
|
||||
## Contribution guidelines 📜
|
||||
|
||||
All contributions to this repository from June 16, 2016, and onward are considered to be
|
||||
licensed under the AGPLv3 or any later version.
|
||||
|
||||
Nextcloud doesn't require a CLA (Contributor License Agreement).
|
||||
The copyright belongs to all the individual contributors. Therefore we recommend
|
||||
that every contributor adds the following line to the header of a file if they
|
||||
changed it substantially:
|
||||
The copyright belongs to all the individual contributors.
|
||||
Therefore we recommend that every contributor adds the following line to the [AUTHORS](AUTHORS) file if they made substantial changes to the code:
|
||||
|
||||
```
|
||||
@copyright Copyright (c) <year>, <your name> (<your email address>)
|
||||
- <your name> <your email address>
|
||||
```
|
||||
|
||||
Please read the [Code of Conduct](https://nextcloud.com/community/code-of-conduct/). This document offers some guidance to ensure Nextcloud participants can cooperate effectively in a positive and inspiring atmosphere and to explain how together we can strengthen and support each other.
|
||||
|
|
|
|||
22
__mocks__/@nextcloud/capabilities.ts
Normal file
22
__mocks__/@nextcloud/capabilities.ts
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
/**
|
||||
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
import type { Capabilities } from '../../apps/files/src/types'
|
||||
|
||||
export const getCapabilities = (): Capabilities => {
|
||||
return {
|
||||
files: {
|
||||
bigfilechunking: true,
|
||||
blacklisted_files: [],
|
||||
forbidden_filename_basenames: [],
|
||||
forbidden_filename_characters: [],
|
||||
forbidden_filename_extensions: [],
|
||||
forbidden_filenames: [],
|
||||
undelete: true,
|
||||
version_deletion: true,
|
||||
version_labeling: true,
|
||||
versioning: true,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
/**
|
||||
* SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import '@testing-library/jest-dom'
|
||||
|
||||
// Mock `window.location` with Jest spies and extend expect
|
||||
import 'jest-location-mock'
|
||||
|
||||
// Mock `window.fetch` with Jest
|
||||
import 'jest-fetch-mock'
|
||||
9
__tests__/mock-window.js
Normal file
9
__tests__/mock-window.js
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
window.OC = { ...window.OC }
|
||||
window.OCA = { ...window.OCA }
|
||||
window.OCP = { ...window.OCP }
|
||||
|
||||
window._oc_webroot = ''
|
||||
5
__tests__/setup-testing-library.js
Normal file
5
__tests__/setup-testing-library.js
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
/**
|
||||
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: CC0-1.0
|
||||
*/
|
||||
import '@testing-library/jest-dom/vitest'
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"verbatimModuleSyntax": false
|
||||
}
|
||||
}
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
<name>Auditing / Logging</name>
|
||||
<summary>Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions.</summary>
|
||||
<description>Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions.</description>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0</version>
|
||||
<licence>agpl</licence>
|
||||
<author>Nextcloud</author>
|
||||
<namespace>AdminAudit</namespace>
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
<category>monitoring</category>
|
||||
<bugs>https://github.com/nextcloud/server/issues</bugs>
|
||||
<dependencies>
|
||||
<nextcloud min-version="30" max-version="30"/>
|
||||
<nextcloud min-version="31" max-version="31"/>
|
||||
</dependencies>
|
||||
<background-jobs>
|
||||
<job>OCA\AdminAudit\BackgroundJobs\Rotate</job>
|
||||
|
|
|
|||
|
|
@ -8,19 +8,22 @@ $baseDir = $vendorDir;
|
|||
return array(
|
||||
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
|
||||
'OCA\\AdminAudit\\Actions\\Action' => $baseDir . '/../lib/Actions/Action.php',
|
||||
'OCA\\AdminAudit\\Actions\\AppManagement' => $baseDir . '/../lib/Actions/AppManagement.php',
|
||||
'OCA\\AdminAudit\\Actions\\Auth' => $baseDir . '/../lib/Actions/Auth.php',
|
||||
'OCA\\AdminAudit\\Actions\\Console' => $baseDir . '/../lib/Actions/Console.php',
|
||||
'OCA\\AdminAudit\\Actions\\Files' => $baseDir . '/../lib/Actions/Files.php',
|
||||
'OCA\\AdminAudit\\Actions\\GroupManagement' => $baseDir . '/../lib/Actions/GroupManagement.php',
|
||||
'OCA\\AdminAudit\\Actions\\Security' => $baseDir . '/../lib/Actions/Security.php',
|
||||
'OCA\\AdminAudit\\Actions\\Sharing' => $baseDir . '/../lib/Actions/Sharing.php',
|
||||
'OCA\\AdminAudit\\Actions\\TagManagement' => $baseDir . '/../lib/Actions/TagManagement.php',
|
||||
'OCA\\AdminAudit\\Actions\\Trashbin' => $baseDir . '/../lib/Actions/Trashbin.php',
|
||||
'OCA\\AdminAudit\\Actions\\UserManagement' => $baseDir . '/../lib/Actions/UserManagement.php',
|
||||
'OCA\\AdminAudit\\Actions\\Versions' => $baseDir . '/../lib/Actions/Versions.php',
|
||||
'OCA\\AdminAudit\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php',
|
||||
'OCA\\AdminAudit\\AuditLogger' => $baseDir . '/../lib/AuditLogger.php',
|
||||
'OCA\\AdminAudit\\BackgroundJobs\\Rotate' => $baseDir . '/../lib/BackgroundJobs/Rotate.php',
|
||||
'OCA\\AdminAudit\\IAuditLogger' => $baseDir . '/../lib/IAuditLogger.php',
|
||||
'OCA\\AdminAudit\\Listener\\AppManagementEventListener' => $baseDir . '/../lib/Listener/AppManagementEventListener.php',
|
||||
'OCA\\AdminAudit\\Listener\\AuthEventListener' => $baseDir . '/../lib/Listener/AuthEventListener.php',
|
||||
'OCA\\AdminAudit\\Listener\\ConsoleEventListener' => $baseDir . '/../lib/Listener/ConsoleEventListener.php',
|
||||
'OCA\\AdminAudit\\Listener\\CriticalActionPerformedEventListener' => $baseDir . '/../lib/Listener/CriticalActionPerformedEventListener.php',
|
||||
'OCA\\AdminAudit\\Listener\\FileEventListener' => $baseDir . '/../lib/Listener/FileEventListener.php',
|
||||
'OCA\\AdminAudit\\Listener\\GroupManagementEventListener' => $baseDir . '/../lib/Listener/GroupManagementEventListener.php',
|
||||
'OCA\\AdminAudit\\Listener\\SecurityEventListener' => $baseDir . '/../lib/Listener/SecurityEventListener.php',
|
||||
'OCA\\AdminAudit\\Listener\\SharingEventListener' => $baseDir . '/../lib/Listener/SharingEventListener.php',
|
||||
'OCA\\AdminAudit\\Listener\\UserManagementEventListener' => $baseDir . '/../lib/Listener/UserManagementEventListener.php',
|
||||
);
|
||||
|
|
|
|||
|
|
@ -23,21 +23,24 @@ class ComposerStaticInitAdminAudit
|
|||
public static $classMap = array (
|
||||
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
|
||||
'OCA\\AdminAudit\\Actions\\Action' => __DIR__ . '/..' . '/../lib/Actions/Action.php',
|
||||
'OCA\\AdminAudit\\Actions\\AppManagement' => __DIR__ . '/..' . '/../lib/Actions/AppManagement.php',
|
||||
'OCA\\AdminAudit\\Actions\\Auth' => __DIR__ . '/..' . '/../lib/Actions/Auth.php',
|
||||
'OCA\\AdminAudit\\Actions\\Console' => __DIR__ . '/..' . '/../lib/Actions/Console.php',
|
||||
'OCA\\AdminAudit\\Actions\\Files' => __DIR__ . '/..' . '/../lib/Actions/Files.php',
|
||||
'OCA\\AdminAudit\\Actions\\GroupManagement' => __DIR__ . '/..' . '/../lib/Actions/GroupManagement.php',
|
||||
'OCA\\AdminAudit\\Actions\\Security' => __DIR__ . '/..' . '/../lib/Actions/Security.php',
|
||||
'OCA\\AdminAudit\\Actions\\Sharing' => __DIR__ . '/..' . '/../lib/Actions/Sharing.php',
|
||||
'OCA\\AdminAudit\\Actions\\TagManagement' => __DIR__ . '/..' . '/../lib/Actions/TagManagement.php',
|
||||
'OCA\\AdminAudit\\Actions\\Trashbin' => __DIR__ . '/..' . '/../lib/Actions/Trashbin.php',
|
||||
'OCA\\AdminAudit\\Actions\\UserManagement' => __DIR__ . '/..' . '/../lib/Actions/UserManagement.php',
|
||||
'OCA\\AdminAudit\\Actions\\Versions' => __DIR__ . '/..' . '/../lib/Actions/Versions.php',
|
||||
'OCA\\AdminAudit\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php',
|
||||
'OCA\\AdminAudit\\AuditLogger' => __DIR__ . '/..' . '/../lib/AuditLogger.php',
|
||||
'OCA\\AdminAudit\\BackgroundJobs\\Rotate' => __DIR__ . '/..' . '/../lib/BackgroundJobs/Rotate.php',
|
||||
'OCA\\AdminAudit\\IAuditLogger' => __DIR__ . '/..' . '/../lib/IAuditLogger.php',
|
||||
'OCA\\AdminAudit\\Listener\\AppManagementEventListener' => __DIR__ . '/..' . '/../lib/Listener/AppManagementEventListener.php',
|
||||
'OCA\\AdminAudit\\Listener\\AuthEventListener' => __DIR__ . '/..' . '/../lib/Listener/AuthEventListener.php',
|
||||
'OCA\\AdminAudit\\Listener\\ConsoleEventListener' => __DIR__ . '/..' . '/../lib/Listener/ConsoleEventListener.php',
|
||||
'OCA\\AdminAudit\\Listener\\CriticalActionPerformedEventListener' => __DIR__ . '/..' . '/../lib/Listener/CriticalActionPerformedEventListener.php',
|
||||
'OCA\\AdminAudit\\Listener\\FileEventListener' => __DIR__ . '/..' . '/../lib/Listener/FileEventListener.php',
|
||||
'OCA\\AdminAudit\\Listener\\GroupManagementEventListener' => __DIR__ . '/..' . '/../lib/Listener/GroupManagementEventListener.php',
|
||||
'OCA\\AdminAudit\\Listener\\SecurityEventListener' => __DIR__ . '/..' . '/../lib/Listener/SecurityEventListener.php',
|
||||
'OCA\\AdminAudit\\Listener\\SharingEventListener' => __DIR__ . '/..' . '/../lib/Listener/SharingEventListener.php',
|
||||
'OCA\\AdminAudit\\Listener\\UserManagementEventListener' => __DIR__ . '/..' . '/../lib/Listener/UserManagementEventListener.php',
|
||||
);
|
||||
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
|
|
|
|||
|
|
@ -2,6 +2,6 @@ OC.L10N.register(
|
|||
"admin_audit",
|
||||
{
|
||||
"Auditing / Logging" : "Auditoría / Registros",
|
||||
"Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "Habilita las opciones de bitácora de Nextcloud tales como registro de acceso a archivos o de acciones delicadas."
|
||||
"Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "Proporciona capacidades de registro para Nextcloud, tales como el registro de accesos a archivos o de acciones delicadas."
|
||||
},
|
||||
"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;");
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{ "translations": {
|
||||
"Auditing / Logging" : "Auditoría / Registros",
|
||||
"Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "Habilita las opciones de bitácora de Nextcloud tales como registro de acceso a archivos o de acciones delicadas."
|
||||
"Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "Proporciona capacidades de registro para Nextcloud, tales como el registro de accesos a archivos o de acciones delicadas."
|
||||
},"pluralForm" :"nplurals=3; plural=n == 1 ? 0 : n != 0 && n % 1000000 == 0 ? 1 : 2;"
|
||||
}
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
namespace OCA\AdminAudit\Actions;
|
||||
|
||||
class AppManagement extends Action {
|
||||
|
||||
/**
|
||||
* @param string $appName
|
||||
*/
|
||||
public function enableApp(string $appName): void {
|
||||
$this->log('App "%s" enabled',
|
||||
['app' => $appName],
|
||||
['app']
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $appName
|
||||
* @param string[] $groups
|
||||
*/
|
||||
public function enableAppForGroups(string $appName, array $groups): void {
|
||||
$this->log('App "%1$s" enabled for groups: %2$s',
|
||||
['app' => $appName, 'groups' => implode(', ', $groups)],
|
||||
['app', 'groups']
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $appName
|
||||
*/
|
||||
public function disableApp(string $appName): void {
|
||||
$this->log('App "%s" disabled',
|
||||
['app' => $appName],
|
||||
['app']
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
namespace OCA\AdminAudit\Actions;
|
||||
|
||||
/**
|
||||
* Class Auth logs all auth related actions
|
||||
*
|
||||
* @package OCA\AdminAudit\Actions
|
||||
*/
|
||||
class Auth extends Action {
|
||||
public function loginAttempt(array $params): void {
|
||||
$this->log(
|
||||
'Login attempt: "%s"',
|
||||
$params,
|
||||
[
|
||||
'uid',
|
||||
],
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
public function loginSuccessful(array $params): void {
|
||||
$this->log(
|
||||
'Login successful: "%s"',
|
||||
$params,
|
||||
[
|
||||
'uid',
|
||||
],
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
public function logout(array $params): void {
|
||||
$this->log(
|
||||
'Logout occurred',
|
||||
[],
|
||||
[]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
namespace OCA\AdminAudit\Actions;
|
||||
|
||||
class Console extends Action {
|
||||
/**
|
||||
* @param array $arguments
|
||||
*/
|
||||
public function runCommand(array $arguments): void {
|
||||
if (!isset($arguments[1]) || $arguments[1] === '_completion') {
|
||||
// Don't log autocompletion
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove `./occ`
|
||||
array_shift($arguments);
|
||||
|
||||
$this->log('Console command executed: %s',
|
||||
['arguments' => implode(' ', $arguments)],
|
||||
['arguments']
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -7,6 +7,7 @@ declare(strict_types=1);
|
|||
*/
|
||||
namespace OCA\AdminAudit\Actions;
|
||||
|
||||
use OC\Files\Node\NonExistingFile;
|
||||
use OCP\Files\Events\Node\BeforeNodeReadEvent;
|
||||
use OCP\Files\Events\Node\BeforeNodeRenamedEvent;
|
||||
use OCP\Files\Events\Node\BeforeNodeWrittenEvent;
|
||||
|
|
@ -17,7 +18,6 @@ use OCP\Files\Events\Node\NodeRenamedEvent;
|
|||
use OCP\Files\Events\Node\NodeWrittenEvent;
|
||||
use OCP\Files\InvalidPathException;
|
||||
use OCP\Files\NotFoundException;
|
||||
use OCP\Preview\BeforePreviewFetchedEvent;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
/**
|
||||
|
|
@ -35,13 +35,14 @@ class Files extends Action {
|
|||
*/
|
||||
public function read(BeforeNodeReadEvent $event): void {
|
||||
try {
|
||||
$node = $event->getNode();
|
||||
$params = [
|
||||
'id' => $event->getNode()->getId(),
|
||||
'path' => mb_substr($event->getNode()->getInternalPath(), 5),
|
||||
'id' => $node instanceof NonExistingFile ? null : $node->getId(),
|
||||
'path' => mb_substr($node->getInternalPath(), 5),
|
||||
];
|
||||
} catch (InvalidPathException|NotFoundException $e) {
|
||||
\OCP\Server::get(LoggerInterface::class)->error(
|
||||
"Exception thrown in file read: ".$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
|
||||
'Exception thrown in file read: '.$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
|
@ -63,7 +64,7 @@ class Files extends Action {
|
|||
$this->renamedNodes[$source->getId()] = $source;
|
||||
} catch (InvalidPathException|NotFoundException $e) {
|
||||
\OCP\Server::get(LoggerInterface::class)->error(
|
||||
"Exception thrown in file rename: ".$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
|
||||
'Exception thrown in file rename: '.$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
|
@ -85,7 +86,7 @@ class Files extends Action {
|
|||
];
|
||||
} catch (InvalidPathException|NotFoundException $e) {
|
||||
\OCP\Server::get(LoggerInterface::class)->error(
|
||||
"Exception thrown in file rename: ".$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
|
||||
'Exception thrown in file rename: '.$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
|
@ -111,7 +112,7 @@ class Files extends Action {
|
|||
];
|
||||
} catch (InvalidPathException|NotFoundException $e) {
|
||||
\OCP\Server::get(LoggerInterface::class)->error(
|
||||
"Exception thrown in file create: ".$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
|
||||
'Exception thrown in file create: '.$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
|
@ -140,7 +141,7 @@ class Files extends Action {
|
|||
];
|
||||
} catch (InvalidPathException|NotFoundException $e) {
|
||||
\OCP\Server::get(LoggerInterface::class)->error(
|
||||
"Exception thrown in file copy: ".$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
|
||||
'Exception thrown in file copy: '.$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
|
@ -157,14 +158,15 @@ class Files extends Action {
|
|||
* @param BeforeNodeWrittenEvent $event
|
||||
*/
|
||||
public function write(BeforeNodeWrittenEvent $event): void {
|
||||
$node = $event->getNode();
|
||||
try {
|
||||
$params = [
|
||||
'id' => $event->getNode()->getId(),
|
||||
'path' => mb_substr($event->getNode()->getInternalPath(), 5),
|
||||
'id' => $node instanceof NonExistingFile ? null : $node->getId(),
|
||||
'path' => mb_substr($node->getInternalPath(), 5),
|
||||
];
|
||||
} catch (InvalidPathException|NotFoundException $e) {
|
||||
\OCP\Server::get(LoggerInterface::class)->error(
|
||||
"Exception thrown in file write: ".$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
|
||||
'Exception thrown in file write: '.$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
|
@ -192,7 +194,7 @@ class Files extends Action {
|
|||
];
|
||||
} catch (InvalidPathException|NotFoundException $e) {
|
||||
\OCP\Server::get(LoggerInterface::class)->error(
|
||||
"Exception thrown in file update: ".$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
|
||||
'Exception thrown in file update: '.$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
|
@ -216,7 +218,7 @@ class Files extends Action {
|
|||
];
|
||||
} catch (InvalidPathException|NotFoundException $e) {
|
||||
\OCP\Server::get(LoggerInterface::class)->error(
|
||||
"Exception thrown in file delete: ".$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
|
||||
'Exception thrown in file delete: '.$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
|
@ -226,33 +228,4 @@ class Files extends Action {
|
|||
array_keys($params)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs preview access to a file
|
||||
*
|
||||
* @param BeforePreviewFetchedEvent $event
|
||||
*/
|
||||
public function preview(BeforePreviewFetchedEvent $event): void {
|
||||
try {
|
||||
$file = $event->getNode();
|
||||
$params = [
|
||||
'id' => $file->getId(),
|
||||
'width' => $event->getWidth(),
|
||||
'height' => $event->getHeight(),
|
||||
'crop' => $event->isCrop(),
|
||||
'mode' => $event->getMode(),
|
||||
'path' => mb_substr($file->getInternalPath(), 5)
|
||||
];
|
||||
} catch (InvalidPathException|NotFoundException $e) {
|
||||
\OCP\Server::get(LoggerInterface::class)->error(
|
||||
"Exception thrown in file preview: ".$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
|
||||
);
|
||||
return;
|
||||
}
|
||||
$this->log(
|
||||
'Preview accessed: (id: "%s", width: "%s", height: "%s" crop: "%s", mode: "%s", path: "%s")',
|
||||
$params,
|
||||
array_keys($params)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,87 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
namespace OCA\AdminAudit\Actions;
|
||||
|
||||
use OCP\IGroup;
|
||||
use OCP\IUser;
|
||||
|
||||
/**
|
||||
* Class GroupManagement logs all group manager related events
|
||||
*
|
||||
* @package OCA\AdminAudit\Actions
|
||||
*/
|
||||
class GroupManagement extends Action {
|
||||
|
||||
/**
|
||||
* log add user to group event
|
||||
*
|
||||
* @param IGroup $group
|
||||
* @param IUser $user
|
||||
*/
|
||||
public function addUser(IGroup $group, IUser $user): void {
|
||||
$this->log('User "%s" added to group "%s"',
|
||||
[
|
||||
'group' => $group->getGID(),
|
||||
'user' => $user->getUID()
|
||||
],
|
||||
[
|
||||
'user', 'group'
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* log remove user from group event
|
||||
*
|
||||
* @param IGroup $group
|
||||
* @param IUser $user
|
||||
*/
|
||||
public function removeUser(IGroup $group, IUser $user): void {
|
||||
$this->log('User "%s" removed from group "%s"',
|
||||
[
|
||||
'group' => $group->getGID(),
|
||||
'user' => $user->getUID()
|
||||
],
|
||||
[
|
||||
'user', 'group'
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* log create group to group event
|
||||
*
|
||||
* @param IGroup $group
|
||||
*/
|
||||
public function createGroup(IGroup $group): void {
|
||||
$this->log('Group created: "%s"',
|
||||
[
|
||||
'group' => $group->getGID()
|
||||
],
|
||||
[
|
||||
'group'
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* log delete group to group event
|
||||
*
|
||||
* @param IGroup $group
|
||||
*/
|
||||
public function deleteGroup(IGroup $group): void {
|
||||
$this->log('Group deleted: "%s"',
|
||||
[
|
||||
'group' => $group->getGID()
|
||||
],
|
||||
[
|
||||
'group'
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
namespace OCA\AdminAudit\Actions;
|
||||
|
||||
use OCP\Authentication\TwoFactorAuth\IProvider;
|
||||
use OCP\IUser;
|
||||
|
||||
/**
|
||||
* Class Sharing logs the sharing actions
|
||||
*
|
||||
* @package OCA\AdminAudit\Actions
|
||||
*/
|
||||
class Security extends Action {
|
||||
/**
|
||||
* Logs failed twofactor challenge
|
||||
*/
|
||||
public function twofactorFailed(IUser $user, IProvider $provider): void {
|
||||
$params = [
|
||||
'displayName' => $user->getDisplayName(),
|
||||
'uid' => $user->getUID(),
|
||||
'provider' => $provider->getDisplayName(),
|
||||
];
|
||||
|
||||
$this->log(
|
||||
'Failed two factor attempt by user %s (%s) with provider %s',
|
||||
$params,
|
||||
[
|
||||
'displayName',
|
||||
'uid',
|
||||
'provider',
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs successful twofactor challenge
|
||||
*/
|
||||
public function twofactorSuccess(IUser $user, IProvider $provider): void {
|
||||
$params = [
|
||||
'displayName' => $user->getDisplayName(),
|
||||
'uid' => $user->getUID(),
|
||||
'provider' => $provider->getDisplayName(),
|
||||
];
|
||||
|
||||
$this->log(
|
||||
'Successful two factor attempt by user %s (%s) with provider %s',
|
||||
$params,
|
||||
[
|
||||
'displayName',
|
||||
'uid',
|
||||
'provider',
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -7,279 +7,12 @@ declare(strict_types=1);
|
|||
*/
|
||||
namespace OCA\AdminAudit\Actions;
|
||||
|
||||
use OCP\Share\IShare;
|
||||
|
||||
/**
|
||||
* Class Sharing logs the sharing actions
|
||||
*
|
||||
* @package OCA\AdminAudit\Actions
|
||||
*/
|
||||
class Sharing extends Action {
|
||||
/**
|
||||
* Logs sharing of data
|
||||
*
|
||||
* @param array $params
|
||||
*/
|
||||
public function shared(array $params): void {
|
||||
if ($params['shareType'] === IShare::TYPE_LINK) {
|
||||
$this->log(
|
||||
'The %s "%s" with ID "%s" has been shared via link with permissions "%s" (Share ID: %s)',
|
||||
$params,
|
||||
[
|
||||
'itemType',
|
||||
'path',
|
||||
'itemSource',
|
||||
'permissions',
|
||||
'id',
|
||||
]
|
||||
);
|
||||
} elseif ($params['shareType'] === IShare::TYPE_USER) {
|
||||
$this->log(
|
||||
'The %s "%s" with ID "%s" has been shared to the user "%s" with permissions "%s" (Share ID: %s)',
|
||||
$params,
|
||||
[
|
||||
'itemType',
|
||||
'path',
|
||||
'itemSource',
|
||||
'shareWith',
|
||||
'permissions',
|
||||
'id',
|
||||
]
|
||||
);
|
||||
} elseif ($params['shareType'] === IShare::TYPE_GROUP) {
|
||||
$this->log(
|
||||
'The %s "%s" with ID "%s" has been shared to the group "%s" with permissions "%s" (Share ID: %s)',
|
||||
$params,
|
||||
[
|
||||
'itemType',
|
||||
'path',
|
||||
'itemSource',
|
||||
'shareWith',
|
||||
'permissions',
|
||||
'id',
|
||||
]
|
||||
);
|
||||
} elseif ($params['shareType'] === IShare::TYPE_ROOM) {
|
||||
$this->log(
|
||||
'The %s "%s" with ID "%s" has been shared to the room "%s" with permissions "%s" (Share ID: %s)',
|
||||
$params,
|
||||
[
|
||||
'itemType',
|
||||
'path',
|
||||
'itemSource',
|
||||
'shareWith',
|
||||
'permissions',
|
||||
'id',
|
||||
]
|
||||
);
|
||||
} elseif ($params['shareType'] === IShare::TYPE_EMAIL) {
|
||||
$this->log(
|
||||
'The %s "%s" with ID "%s" has been shared to the email recipient "%s" with permissions "%s" (Share ID: %s)',
|
||||
$params,
|
||||
[
|
||||
'itemType',
|
||||
'path',
|
||||
'itemSource',
|
||||
'shareWith',
|
||||
'permissions',
|
||||
'id',
|
||||
]
|
||||
);
|
||||
} elseif ($params['shareType'] === IShare::TYPE_CIRCLE) {
|
||||
$this->log(
|
||||
'The %s "%s" with ID "%s" has been shared to the circle "%s" with permissions "%s" (Share ID: %s)',
|
||||
$params,
|
||||
[
|
||||
'itemType',
|
||||
'path',
|
||||
'itemSource',
|
||||
'shareWith',
|
||||
'permissions',
|
||||
'id',
|
||||
]
|
||||
);
|
||||
} elseif ($params['shareType'] === IShare::TYPE_REMOTE) {
|
||||
$this->log(
|
||||
'The %s "%s" with ID "%s" has been shared to the remote user "%s" with permissions "%s" (Share ID: %s)',
|
||||
$params,
|
||||
[
|
||||
'itemType',
|
||||
'path',
|
||||
'itemSource',
|
||||
'shareWith',
|
||||
'permissions',
|
||||
'id',
|
||||
]
|
||||
);
|
||||
} elseif ($params['shareType'] === IShare::TYPE_REMOTE_GROUP) {
|
||||
$this->log(
|
||||
'The %s "%s" with ID "%s" has been shared to the remote group "%s" with permissions "%s" (Share ID: %s)',
|
||||
$params,
|
||||
[
|
||||
'itemType',
|
||||
'path',
|
||||
'itemSource',
|
||||
'shareWith',
|
||||
'permissions',
|
||||
'id',
|
||||
]
|
||||
);
|
||||
} elseif ($params['shareType'] === IShare::TYPE_DECK) {
|
||||
$this->log(
|
||||
'The %s "%s" with ID "%s" has been shared to the deck card "%s" with permissions "%s" (Share ID: %s)',
|
||||
$params,
|
||||
[
|
||||
'itemType',
|
||||
'path',
|
||||
'itemSource',
|
||||
'shareWith',
|
||||
'permissions',
|
||||
'id',
|
||||
]
|
||||
);
|
||||
} elseif ($params['shareType'] === 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',
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs unsharing of data
|
||||
*
|
||||
* @param array $params
|
||||
*/
|
||||
public function unshare(array $params): void {
|
||||
if ($params['shareType'] === IShare::TYPE_LINK) {
|
||||
$this->log(
|
||||
'The %s "%s" with ID "%s" has been unshared (Share ID: %s)',
|
||||
$params,
|
||||
[
|
||||
'itemType',
|
||||
'fileTarget',
|
||||
'itemSource',
|
||||
'id',
|
||||
]
|
||||
);
|
||||
} elseif ($params['shareType'] === IShare::TYPE_USER) {
|
||||
$this->log(
|
||||
'The %s "%s" with ID "%s" has been unshared from the user "%s" (Share ID: %s)',
|
||||
$params,
|
||||
[
|
||||
'itemType',
|
||||
'fileTarget',
|
||||
'itemSource',
|
||||
'shareWith',
|
||||
'id',
|
||||
]
|
||||
);
|
||||
} elseif ($params['shareType'] === IShare::TYPE_GROUP) {
|
||||
$this->log(
|
||||
'The %s "%s" with ID "%s" has been unshared from the group "%s" (Share ID: %s)',
|
||||
$params,
|
||||
[
|
||||
'itemType',
|
||||
'fileTarget',
|
||||
'itemSource',
|
||||
'shareWith',
|
||||
'id',
|
||||
]
|
||||
);
|
||||
} elseif ($params['shareType'] === IShare::TYPE_ROOM) {
|
||||
$this->log(
|
||||
'The %s "%s" with ID "%s" has been unshared from the room "%s" (Share ID: %s)',
|
||||
$params,
|
||||
[
|
||||
'itemType',
|
||||
'fileTarget',
|
||||
'itemSource',
|
||||
'shareWith',
|
||||
'id',
|
||||
]
|
||||
);
|
||||
} elseif ($params['shareType'] === IShare::TYPE_EMAIL) {
|
||||
$this->log(
|
||||
'The %s "%s" with ID "%s" has been unshared from the email recipient "%s" (Share ID: %s)',
|
||||
$params,
|
||||
[
|
||||
'itemType',
|
||||
'fileTarget',
|
||||
'itemSource',
|
||||
'shareWith',
|
||||
'id',
|
||||
]
|
||||
);
|
||||
} elseif ($params['shareType'] === IShare::TYPE_CIRCLE) {
|
||||
$this->log(
|
||||
'The %s "%s" with ID "%s" has been unshared from the circle "%s" (Share ID: %s)',
|
||||
$params,
|
||||
[
|
||||
'itemType',
|
||||
'fileTarget',
|
||||
'itemSource',
|
||||
'shareWith',
|
||||
'id',
|
||||
]
|
||||
);
|
||||
} elseif ($params['shareType'] === IShare::TYPE_REMOTE) {
|
||||
$this->log(
|
||||
'The %s "%s" with ID "%s" has been unshared from the remote user "%s" (Share ID: %s)',
|
||||
$params,
|
||||
[
|
||||
'itemType',
|
||||
'fileTarget',
|
||||
'itemSource',
|
||||
'shareWith',
|
||||
'id',
|
||||
]
|
||||
);
|
||||
} elseif ($params['shareType'] === IShare::TYPE_REMOTE_GROUP) {
|
||||
$this->log(
|
||||
'The %s "%s" with ID "%s" has been unshared from the remote group "%s" (Share ID: %s)',
|
||||
$params,
|
||||
[
|
||||
'itemType',
|
||||
'fileTarget',
|
||||
'itemSource',
|
||||
'shareWith',
|
||||
'id',
|
||||
]
|
||||
);
|
||||
} elseif ($params['shareType'] === IShare::TYPE_DECK) {
|
||||
$this->log(
|
||||
'The %s "%s" with ID "%s" has been unshared from the deck card "%s" (Share ID: %s)',
|
||||
$params,
|
||||
[
|
||||
'itemType',
|
||||
'fileTarget',
|
||||
'itemSource',
|
||||
'shareWith',
|
||||
'id',
|
||||
]
|
||||
);
|
||||
} elseif ($params['shareType'] === 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',
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs the updating of permission changes for shares
|
||||
|
|
|
|||
27
apps/admin_audit/lib/Actions/TagManagement.php
Normal file
27
apps/admin_audit/lib/Actions/TagManagement.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*!
|
||||
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
namespace OCA\AdminAudit\Actions;
|
||||
|
||||
use OCP\SystemTag\ISystemTag;
|
||||
|
||||
class TagManagement extends Action {
|
||||
/**
|
||||
* @param ISystemTag $tag newly created tag
|
||||
*/
|
||||
public function createTag(ISystemTag $tag): void {
|
||||
$this->log('System tag "%s" (%s, %s) created',
|
||||
[
|
||||
'name' => $tag->getName(),
|
||||
'visbility' => $tag->isUserVisible() ? 'visible' : 'invisible',
|
||||
'assignable' => $tag->isUserAssignable() ? 'user assignable' : 'system only',
|
||||
],
|
||||
['name', 'visibility', 'assignable']
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,122 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
namespace OCA\AdminAudit\Actions;
|
||||
|
||||
use OCP\IUser;
|
||||
|
||||
/**
|
||||
* Class UserManagement logs all user management related actions.
|
||||
*
|
||||
* @package OCA\AdminAudit\Actions
|
||||
*/
|
||||
class UserManagement extends Action {
|
||||
/**
|
||||
* Log creation of users
|
||||
*
|
||||
* @param array $params
|
||||
*/
|
||||
public function create(array $params): void {
|
||||
$this->log(
|
||||
'User created: "%s"',
|
||||
$params,
|
||||
[
|
||||
'uid',
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Log assignments of users (typically user backends)
|
||||
*
|
||||
* @param string $uid
|
||||
*/
|
||||
public function assign(string $uid): void {
|
||||
$this->log(
|
||||
'UserID assigned: "%s"',
|
||||
[ 'uid' => $uid ],
|
||||
[ 'uid' ]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Log deletion of users
|
||||
*
|
||||
* @param array $params
|
||||
*/
|
||||
public function delete(array $params): void {
|
||||
$this->log(
|
||||
'User deleted: "%s"',
|
||||
$params,
|
||||
[
|
||||
'uid',
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Log unassignments of users (typically user backends, no data removed)
|
||||
*
|
||||
* @param string $uid
|
||||
*/
|
||||
public function unassign(string $uid): void {
|
||||
$this->log(
|
||||
'UserID unassigned: "%s"',
|
||||
[ 'uid' => $uid ],
|
||||
[ 'uid' ]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Log enabling of users
|
||||
*
|
||||
* @param array $params
|
||||
*/
|
||||
public function change(array $params): void {
|
||||
switch ($params['feature']) {
|
||||
case 'enabled':
|
||||
$this->log(
|
||||
$params['value'] === true
|
||||
? 'User enabled: "%s"'
|
||||
: 'User disabled: "%s"',
|
||||
['user' => $params['user']->getUID()],
|
||||
[
|
||||
'user',
|
||||
]
|
||||
);
|
||||
break;
|
||||
case 'eMailAddress':
|
||||
$this->log(
|
||||
'Email address changed for user %s',
|
||||
['user' => $params['user']->getUID()],
|
||||
[
|
||||
'user',
|
||||
]
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs changing of the user scope
|
||||
*
|
||||
* @param IUser $user
|
||||
*/
|
||||
public function setPassword(IUser $user): void {
|
||||
if ($user->getBackendClassName() === 'Database') {
|
||||
$this->log(
|
||||
'Password of user "%s" has been changed',
|
||||
[
|
||||
'user' => $user->getUID(),
|
||||
],
|
||||
[
|
||||
'user',
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,28 +1,35 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace OCA\AdminAudit\AppInfo;
|
||||
|
||||
use OC\Group\Manager as GroupManager;
|
||||
use OC\User\Session as UserSession;
|
||||
use OCA\AdminAudit\Actions\AppManagement;
|
||||
use OCA\AdminAudit\Actions\Auth;
|
||||
use OCA\AdminAudit\Actions\Console;
|
||||
use OCA\AdminAudit\Actions\Files;
|
||||
use OCA\AdminAudit\Actions\GroupManagement;
|
||||
use OCA\AdminAudit\Actions\Security;
|
||||
use OCA\AdminAudit\Actions\Sharing;
|
||||
use OCA\AdminAudit\Actions\TagManagement;
|
||||
use OCA\AdminAudit\Actions\Trashbin;
|
||||
use OCA\AdminAudit\Actions\UserManagement;
|
||||
use OCA\AdminAudit\Actions\Versions;
|
||||
use OCA\AdminAudit\AuditLogger;
|
||||
use OCA\AdminAudit\IAuditLogger;
|
||||
use OCA\AdminAudit\Listener\AppManagementEventListener;
|
||||
use OCA\AdminAudit\Listener\AuthEventListener;
|
||||
use OCA\AdminAudit\Listener\ConsoleEventListener;
|
||||
use OCA\AdminAudit\Listener\CriticalActionPerformedEventListener;
|
||||
use OCP\App\ManagerEvent;
|
||||
use OCA\AdminAudit\Listener\FileEventListener;
|
||||
use OCA\AdminAudit\Listener\GroupManagementEventListener;
|
||||
use OCA\AdminAudit\Listener\SecurityEventListener;
|
||||
use OCA\AdminAudit\Listener\SharingEventListener;
|
||||
use OCA\AdminAudit\Listener\UserManagementEventListener;
|
||||
use OCP\App\Events\AppDisableEvent;
|
||||
use OCP\App\Events\AppEnableEvent;
|
||||
use OCP\App\Events\AppUpdateEvent;
|
||||
use OCP\AppFramework\App;
|
||||
use OCP\AppFramework\Bootstrap\IBootContext;
|
||||
use OCP\AppFramework\Bootstrap\IBootstrap;
|
||||
|
|
@ -39,21 +46,31 @@ use OCP\Files\Events\Node\NodeCreatedEvent;
|
|||
use OCP\Files\Events\Node\NodeDeletedEvent;
|
||||
use OCP\Files\Events\Node\NodeRenamedEvent;
|
||||
use OCP\Files\Events\Node\NodeWrittenEvent;
|
||||
use OCP\Group\Events\GroupCreatedEvent;
|
||||
use OCP\Group\Events\GroupDeletedEvent;
|
||||
use OCP\Group\Events\UserAddedEvent;
|
||||
use OCP\Group\Events\UserRemovedEvent;
|
||||
use OCP\IConfig;
|
||||
use OCP\IGroupManager;
|
||||
use OCP\IUserSession;
|
||||
use OCP\Log\Audit\CriticalActionPerformedEvent;
|
||||
use OCP\Log\ILogFactory;
|
||||
use OCP\Preview\BeforePreviewFetchedEvent;
|
||||
use OCP\Share;
|
||||
use OCP\Share\Events\ShareCreatedEvent;
|
||||
use OCP\Share\Events\ShareDeletedEvent;
|
||||
use OCP\User\Events\BeforeUserLoggedInEvent;
|
||||
use OCP\User\Events\BeforeUserLoggedOutEvent;
|
||||
use OCP\User\Events\PasswordUpdatedEvent;
|
||||
use OCP\User\Events\UserChangedEvent;
|
||||
use OCP\User\Events\UserCreatedEvent;
|
||||
use OCP\User\Events\UserDeletedEvent;
|
||||
use OCP\User\Events\UserIdAssignedEvent;
|
||||
use OCP\User\Events\UserIdUnassignedEvent;
|
||||
use OCP\User\Events\UserLoggedInEvent;
|
||||
use OCP\User\Events\UserLoggedInWithCookieEvent;
|
||||
use OCP\Util;
|
||||
use Psr\Container\ContainerInterface;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class Application extends App implements IBootstrap {
|
||||
/** @var LoggerInterface */
|
||||
protected $logger;
|
||||
|
||||
public function __construct() {
|
||||
parent::__construct('admin_audit');
|
||||
}
|
||||
|
|
@ -64,6 +81,45 @@ class Application extends App implements IBootstrap {
|
|||
});
|
||||
|
||||
$context->registerEventListener(CriticalActionPerformedEvent::class, CriticalActionPerformedEventListener::class);
|
||||
|
||||
// User management events
|
||||
$context->registerEventListener(UserCreatedEvent::class, UserManagementEventListener::class);
|
||||
$context->registerEventListener(UserDeletedEvent::class, UserManagementEventListener::class);
|
||||
$context->registerEventListener(UserChangedEvent::class, UserManagementEventListener::class);
|
||||
$context->registerEventListener(PasswordUpdatedEvent::class, UserManagementEventListener::class);
|
||||
$context->registerEventListener(UserIdAssignedEvent::class, UserManagementEventListener::class);
|
||||
$context->registerEventListener(UserIdUnassignedEvent::class, UserManagementEventListener::class);
|
||||
|
||||
// Group management events
|
||||
$context->registerEventListener(UserAddedEvent::class, GroupManagementEventListener::class);
|
||||
$context->registerEventListener(UserRemovedEvent::class, GroupManagementEventListener::class);
|
||||
$context->registerEventListener(GroupCreatedEvent::class, GroupManagementEventListener::class);
|
||||
$context->registerEventListener(GroupDeletedEvent::class, GroupManagementEventListener::class);
|
||||
|
||||
// Sharing events
|
||||
$context->registerEventListener(ShareCreatedEvent::class, SharingEventListener::class);
|
||||
$context->registerEventListener(ShareDeletedEvent::class, SharingEventListener::class);
|
||||
|
||||
// Auth events
|
||||
$context->registerEventListener(BeforeUserLoggedInEvent::class, AuthEventListener::class);
|
||||
$context->registerEventListener(UserLoggedInWithCookieEvent::class, AuthEventListener::class);
|
||||
$context->registerEventListener(UserLoggedInEvent::class, AuthEventListener::class);
|
||||
$context->registerEventListener(BeforeUserLoggedOutEvent::class, AuthEventListener::class);
|
||||
|
||||
// File events
|
||||
$context->registerEventListener(BeforePreviewFetchedEvent::class, FileEventListener::class);
|
||||
|
||||
// Security events
|
||||
$context->registerEventListener(TwoFactorProviderChallengePassed::class, SecurityEventListener::class);
|
||||
$context->registerEventListener(TwoFactorProviderChallengeFailed::class, SecurityEventListener::class);
|
||||
|
||||
// App management events
|
||||
$context->registerEventListener(AppEnableEvent::class, AppManagementEventListener::class);
|
||||
$context->registerEventListener(AppDisableEvent::class, AppManagementEventListener::class);
|
||||
$context->registerEventListener(AppUpdateEvent::class, AppManagementEventListener::class);
|
||||
|
||||
// Console events
|
||||
$context->registerEventListener(ConsoleEvent::class, ConsoleEventListener::class);
|
||||
}
|
||||
|
||||
public function boot(IBootContext $context): void {
|
||||
|
|
@ -74,111 +130,41 @@ class Application extends App implements IBootstrap {
|
|||
* TODO: once the hooks are migrated to lazy events, this should be done
|
||||
* in \OCA\AdminAudit\AppInfo\Application::register
|
||||
*/
|
||||
$this->registerHooks($logger, $context->getServerContainer());
|
||||
$this->registerLegacyHooks($logger, $context->getServerContainer());
|
||||
}
|
||||
|
||||
/**
|
||||
* Register hooks in order to log them
|
||||
*/
|
||||
private function registerHooks(IAuditLogger $logger,
|
||||
ContainerInterface $serverContainer): void {
|
||||
$this->userManagementHooks($logger, $serverContainer->get(IUserSession::class));
|
||||
$this->groupHooks($logger, $serverContainer->get(IGroupManager::class));
|
||||
$this->authHooks($logger);
|
||||
|
||||
|
||||
private function registerLegacyHooks(IAuditLogger $logger, ContainerInterface $serverContainer): void {
|
||||
/** @var IEventDispatcher $eventDispatcher */
|
||||
$eventDispatcher = $serverContainer->get(IEventDispatcher::class);
|
||||
$this->consoleHooks($logger, $eventDispatcher);
|
||||
$this->appHooks($logger, $eventDispatcher);
|
||||
|
||||
$this->sharingHooks($logger);
|
||||
|
||||
$this->sharingLegacyHooks($logger);
|
||||
$this->fileHooks($logger, $eventDispatcher);
|
||||
$this->trashbinHooks($logger);
|
||||
$this->versionsHooks($logger);
|
||||
|
||||
$this->securityHooks($logger, $eventDispatcher);
|
||||
$this->tagHooks($logger, $eventDispatcher);
|
||||
}
|
||||
|
||||
private function userManagementHooks(IAuditLogger $logger,
|
||||
IUserSession $userSession): void {
|
||||
$userActions = new UserManagement($logger);
|
||||
|
||||
Util::connectHook('OC_User', 'post_createUser', $userActions, 'create');
|
||||
Util::connectHook('OC_User', 'post_deleteUser', $userActions, 'delete');
|
||||
Util::connectHook('OC_User', 'changeUser', $userActions, 'change');
|
||||
|
||||
assert($userSession instanceof UserSession);
|
||||
$userSession->listen('\OC\User', 'postSetPassword', [$userActions, 'setPassword']);
|
||||
$userSession->listen('\OC\User', 'assignedUserId', [$userActions, 'assign']);
|
||||
$userSession->listen('\OC\User', 'postUnassignedUserId', [$userActions, 'unassign']);
|
||||
}
|
||||
|
||||
private function groupHooks(IAuditLogger $logger,
|
||||
IGroupManager $groupManager): void {
|
||||
$groupActions = new GroupManagement($logger);
|
||||
|
||||
assert($groupManager instanceof GroupManager);
|
||||
$groupManager->listen('\OC\Group', 'postRemoveUser', [$groupActions, 'removeUser']);
|
||||
$groupManager->listen('\OC\Group', 'postAddUser', [$groupActions, 'addUser']);
|
||||
$groupManager->listen('\OC\Group', 'postDelete', [$groupActions, 'deleteGroup']);
|
||||
$groupManager->listen('\OC\Group', 'postCreate', [$groupActions, 'createGroup']);
|
||||
}
|
||||
|
||||
private function sharingHooks(IAuditLogger $logger): void {
|
||||
private function sharingLegacyHooks(IAuditLogger $logger): void {
|
||||
$shareActions = new Sharing($logger);
|
||||
|
||||
Util::connectHook(Share::class, 'post_shared', $shareActions, 'shared');
|
||||
Util::connectHook(Share::class, 'post_unshare', $shareActions, 'unshare');
|
||||
Util::connectHook(Share::class, 'post_unshareFromSelf', $shareActions, 'unshare');
|
||||
Util::connectHook(Share::class, 'post_update_permissions', $shareActions, 'updatePermissions');
|
||||
Util::connectHook(Share::class, 'post_update_password', $shareActions, 'updatePassword');
|
||||
Util::connectHook(Share::class, 'post_set_expiration_date', $shareActions, 'updateExpirationDate');
|
||||
Util::connectHook(Share::class, 'share_link_access', $shareActions, 'shareAccessed');
|
||||
}
|
||||
|
||||
private function authHooks(IAuditLogger $logger): void {
|
||||
$authActions = new Auth($logger);
|
||||
|
||||
Util::connectHook('OC_User', 'pre_login', $authActions, 'loginAttempt');
|
||||
Util::connectHook('OC_User', 'post_login', $authActions, 'loginSuccessful');
|
||||
Util::connectHook('OC_User', 'logout', $authActions, 'logout');
|
||||
}
|
||||
|
||||
private function appHooks(IAuditLogger $logger,
|
||||
private function tagHooks(IAuditLogger $logger,
|
||||
IEventDispatcher $eventDispatcher): void {
|
||||
$eventDispatcher->addListener(ManagerEvent::EVENT_APP_ENABLE, function (ManagerEvent $event) use ($logger) {
|
||||
$appActions = new AppManagement($logger);
|
||||
$appActions->enableApp($event->getAppID());
|
||||
});
|
||||
$eventDispatcher->addListener(ManagerEvent::EVENT_APP_ENABLE_FOR_GROUPS, function (ManagerEvent $event) use ($logger) {
|
||||
$appActions = new AppManagement($logger);
|
||||
$appActions->enableAppForGroups($event->getAppID(), $event->getGroups());
|
||||
});
|
||||
$eventDispatcher->addListener(ManagerEvent::EVENT_APP_DISABLE, function (ManagerEvent $event) use ($logger) {
|
||||
$appActions = new AppManagement($logger);
|
||||
$appActions->disableApp($event->getAppID());
|
||||
$eventDispatcher->addListener(\OCP\SystemTag\ManagerEvent::EVENT_CREATE, function (\OCP\SystemTag\ManagerEvent $event) use ($logger) {
|
||||
$tagActions = new TagManagement($logger);
|
||||
$tagActions->createTag($event->getTag());
|
||||
});
|
||||
}
|
||||
|
||||
private function consoleHooks(IAuditLogger $logger,
|
||||
IEventDispatcher $eventDispatcher): void {
|
||||
$eventDispatcher->addListener(ConsoleEvent::class, function (ConsoleEvent $event) use ($logger) {
|
||||
$appActions = new Console($logger);
|
||||
$appActions->runCommand($event->getArguments());
|
||||
});
|
||||
}
|
||||
|
||||
private function fileHooks(IAuditLogger $logger,
|
||||
IEventDispatcher $eventDispatcher): void {
|
||||
private function fileHooks(IAuditLogger $logger, IEventDispatcher $eventDispatcher): void {
|
||||
$fileActions = new Files($logger);
|
||||
$eventDispatcher->addListener(
|
||||
BeforePreviewFetchedEvent::class,
|
||||
function (BeforePreviewFetchedEvent $event) use ($fileActions) {
|
||||
$fileActions->preview($event);
|
||||
}
|
||||
);
|
||||
|
||||
$eventDispatcher->addListener(
|
||||
BeforeNodeRenamedEvent::class,
|
||||
|
|
@ -248,16 +234,4 @@ class Application extends App implements IBootstrap {
|
|||
Util::connectHook('\OCP\Trashbin', 'preDelete', $trashActions, 'delete');
|
||||
Util::connectHook('\OCA\Files_Trashbin\Trashbin', 'post_restore', $trashActions, 'restore');
|
||||
}
|
||||
|
||||
private function securityHooks(IAuditLogger $logger,
|
||||
IEventDispatcher $eventDispatcher): void {
|
||||
$eventDispatcher->addListener(TwoFactorProviderChallengePassed::class, function (TwoFactorProviderChallengePassed $event) use ($logger) {
|
||||
$security = new Security($logger);
|
||||
$security->twofactorSuccess($event->getUser(), $event->getProvider());
|
||||
});
|
||||
$eventDispatcher->addListener(TwoFactorProviderChallengeFailed::class, function (TwoFactorProviderChallengeFailed $event) use ($logger) {
|
||||
$security = new Security($logger);
|
||||
$security->twofactorFailed($event->getUser(), $event->getProvider());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace OCA\AdminAudit;
|
||||
|
||||
use OCP\IConfig;
|
||||
|
|
|
|||
60
apps/admin_audit/lib/Listener/AppManagementEventListener.php
Normal file
60
apps/admin_audit/lib/Listener/AppManagementEventListener.php
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace OCA\AdminAudit\Listener;
|
||||
|
||||
use OCA\AdminAudit\Actions\Action;
|
||||
use OCP\App\Events\AppDisableEvent;
|
||||
use OCP\App\Events\AppEnableEvent;
|
||||
use OCP\App\Events\AppUpdateEvent;
|
||||
use OCP\EventDispatcher\Event;
|
||||
use OCP\EventDispatcher\IEventListener;
|
||||
|
||||
/**
|
||||
* @template-implements IEventListener<AppEnableEvent|AppDisableEvent|AppUpdateEvent>
|
||||
*/
|
||||
class AppManagementEventListener extends Action implements IEventListener {
|
||||
public function handle(Event $event): void {
|
||||
if ($event instanceof AppEnableEvent) {
|
||||
$this->appEnable($event);
|
||||
} elseif ($event instanceof AppDisableEvent) {
|
||||
$this->appDisable($event);
|
||||
} elseif ($event instanceof AppUpdateEvent) {
|
||||
$this->appUpdate($event);
|
||||
}
|
||||
}
|
||||
|
||||
private function appEnable(AppEnableEvent $event): void {
|
||||
if (empty($event->getGroupIds())) {
|
||||
$this->log('App "%s" enabled',
|
||||
['app' => $event->getAppId()],
|
||||
['app']
|
||||
);
|
||||
} else {
|
||||
$this->log('App "%1$s" enabled for groups: %2$s',
|
||||
['app' => $event->getAppId(), 'groups' => implode(', ', $event->getGroupIds())],
|
||||
['app', 'groups']
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
private function appDisable(AppDisableEvent $event): void {
|
||||
$this->log('App "%s" disabled',
|
||||
['app' => $event->getAppId()],
|
||||
['app']
|
||||
);
|
||||
}
|
||||
|
||||
private function appUpdate(AppUpdateEvent $event): void {
|
||||
$this->log('App "%s" updated',
|
||||
['app' => $event->getAppId()],
|
||||
['app']
|
||||
);
|
||||
}
|
||||
}
|
||||
67
apps/admin_audit/lib/Listener/AuthEventListener.php
Normal file
67
apps/admin_audit/lib/Listener/AuthEventListener.php
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace OCA\AdminAudit\Listener;
|
||||
|
||||
use OCA\AdminAudit\Actions\Action;
|
||||
use OCP\EventDispatcher\Event;
|
||||
use OCP\EventDispatcher\IEventListener;
|
||||
use OCP\User\Events\BeforeUserLoggedInEvent;
|
||||
use OCP\User\Events\BeforeUserLoggedOutEvent;
|
||||
use OCP\User\Events\UserLoggedInEvent;
|
||||
use OCP\User\Events\UserLoggedInWithCookieEvent;
|
||||
|
||||
/**
|
||||
* @template-implements IEventListener<BeforeUserLoggedInEvent|UserLoggedInWithCookieEvent|UserLoggedInEvent|BeforeUserLoggedOutEvent>
|
||||
*/
|
||||
class AuthEventListener extends Action implements IEventListener {
|
||||
public function handle(Event $event): void {
|
||||
if ($event instanceof BeforeUserLoggedInEvent) {
|
||||
$this->beforeUserLoggedIn($event);
|
||||
} elseif ($event instanceof UserLoggedInWithCookieEvent || $event instanceof UserLoggedInEvent) {
|
||||
$this->userLoggedIn($event);
|
||||
} elseif ($event instanceof BeforeUserLoggedOutEvent) {
|
||||
$this->beforeUserLogout($event);
|
||||
}
|
||||
}
|
||||
|
||||
private function beforeUserLoggedIn(BeforeUserLoggedInEvent $event): void {
|
||||
$this->log(
|
||||
'Login attempt: "%s"',
|
||||
[
|
||||
'uid' => $event->getUsername()
|
||||
],
|
||||
[
|
||||
'uid',
|
||||
],
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
private function userLoggedIn(UserLoggedInWithCookieEvent|UserLoggedInEvent $event): void {
|
||||
$this->log(
|
||||
'Login successful: "%s"',
|
||||
[
|
||||
'uid' => $event->getUser()->getUID()
|
||||
],
|
||||
[
|
||||
'uid',
|
||||
],
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
private function beforeUserLogout(BeforeUserLoggedOutEvent $event): void {
|
||||
$this->log(
|
||||
'Logout occurred',
|
||||
[],
|
||||
[]
|
||||
);
|
||||
}
|
||||
}
|
||||
42
apps/admin_audit/lib/Listener/ConsoleEventListener.php
Normal file
42
apps/admin_audit/lib/Listener/ConsoleEventListener.php
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace OCA\AdminAudit\Listener;
|
||||
|
||||
use OCA\AdminAudit\Actions\Action;
|
||||
use OCP\Console\ConsoleEvent;
|
||||
use OCP\EventDispatcher\Event;
|
||||
use OCP\EventDispatcher\IEventListener;
|
||||
|
||||
/**
|
||||
* @template-implements IEventListener<ConsoleEvent>
|
||||
*/
|
||||
class ConsoleEventListener extends Action implements IEventListener {
|
||||
public function handle(Event $event): void {
|
||||
if ($event instanceof ConsoleEvent) {
|
||||
$this->runCommand($event);
|
||||
}
|
||||
}
|
||||
|
||||
private function runCommand(ConsoleEvent $event): void {
|
||||
$arguments = $event->getArguments();
|
||||
if (!isset($arguments[1]) || $arguments[1] === '_completion') {
|
||||
// Don't log autocompletion
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove `./occ`
|
||||
array_shift($arguments);
|
||||
|
||||
$this->log('Console command executed: %s',
|
||||
['arguments' => implode(' ', $arguments)],
|
||||
['arguments']
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +1,12 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace OCA\AdminAudit\Listener;
|
||||
|
||||
use OCA\AdminAudit\Actions\Action;
|
||||
|
|
|
|||
56
apps/admin_audit/lib/Listener/FileEventListener.php
Normal file
56
apps/admin_audit/lib/Listener/FileEventListener.php
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace OCA\AdminAudit\Listener;
|
||||
|
||||
use OCA\AdminAudit\Actions\Action;
|
||||
use OCP\EventDispatcher\Event;
|
||||
use OCP\EventDispatcher\IEventListener;
|
||||
use OCP\Files\InvalidPathException;
|
||||
use OCP\Files\NotFoundException;
|
||||
use OCP\Preview\BeforePreviewFetchedEvent;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
/**
|
||||
* @template-implements IEventListener<BeforePreviewFetchedEvent>
|
||||
*/
|
||||
class FileEventListener extends Action implements IEventListener {
|
||||
public function handle(Event $event): void {
|
||||
if ($event instanceof BeforePreviewFetchedEvent) {
|
||||
$this->beforePreviewFetched($event);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs preview access to a file
|
||||
*/
|
||||
private function beforePreviewFetched(BeforePreviewFetchedEvent $event): void {
|
||||
try {
|
||||
$file = $event->getNode();
|
||||
$params = [
|
||||
'id' => $file->getId(),
|
||||
'width' => $event->getWidth(),
|
||||
'height' => $event->getHeight(),
|
||||
'crop' => $event->isCrop(),
|
||||
'mode' => $event->getMode(),
|
||||
'path' => mb_substr($file->getInternalPath(), 5)
|
||||
];
|
||||
$this->log(
|
||||
'Preview accessed: (id: "%s", width: "%s", height: "%s" crop: "%s", mode: "%s", path: "%s")',
|
||||
$params,
|
||||
array_keys($params)
|
||||
);
|
||||
} catch (InvalidPathException|NotFoundException $e) {
|
||||
\OCP\Server::get(LoggerInterface::class)->error(
|
||||
'Exception thrown in file preview: '.$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
|
||||
);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace OCA\AdminAudit\Listener;
|
||||
|
||||
use OCA\AdminAudit\Actions\Action;
|
||||
use OCP\EventDispatcher\Event;
|
||||
use OCP\EventDispatcher\IEventListener;
|
||||
use OCP\Group\Events\GroupCreatedEvent;
|
||||
use OCP\Group\Events\GroupDeletedEvent;
|
||||
use OCP\Group\Events\UserAddedEvent;
|
||||
use OCP\Group\Events\UserRemovedEvent;
|
||||
|
||||
/**
|
||||
* @template-implements IEventListener<UserAddedEvent|UserRemovedEvent|GroupCreatedEvent|GroupDeletedEvent>
|
||||
*/
|
||||
class GroupManagementEventListener extends Action implements IEventListener {
|
||||
public function handle(Event $event): void {
|
||||
if ($event instanceof UserAddedEvent) {
|
||||
$this->userAdded($event);
|
||||
} elseif ($event instanceof UserRemovedEvent) {
|
||||
$this->userRemoved($event);
|
||||
} elseif ($event instanceof GroupCreatedEvent) {
|
||||
$this->groupCreated($event);
|
||||
} elseif ($event instanceof GroupDeletedEvent) {
|
||||
$this->groupDeleted($event);
|
||||
}
|
||||
}
|
||||
|
||||
private function userAdded(UserAddedEvent $event): void {
|
||||
$this->log('User "%s" added to group "%s"',
|
||||
[
|
||||
'group' => $event->getGroup()->getGID(),
|
||||
'user' => $event->getUser()->getUID()
|
||||
],
|
||||
[
|
||||
'user', 'group'
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
private function userRemoved(UserRemovedEvent $event): void {
|
||||
$this->log('User "%s" removed from group "%s"',
|
||||
[
|
||||
'group' => $event->getGroup()->getGID(),
|
||||
'user' => $event->getUser()->getUID()
|
||||
],
|
||||
[
|
||||
'user', 'group'
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
private function groupCreated(GroupCreatedEvent $event): void {
|
||||
$this->log('Group created: "%s"',
|
||||
[
|
||||
'group' => $event->getGroup()->getGID()
|
||||
],
|
||||
[
|
||||
'group'
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
private function groupDeleted(GroupDeletedEvent $event): void {
|
||||
$this->log('Group deleted: "%s"',
|
||||
[
|
||||
'group' => $event->getGroup()->getGID()
|
||||
],
|
||||
[
|
||||
'group'
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
61
apps/admin_audit/lib/Listener/SecurityEventListener.php
Normal file
61
apps/admin_audit/lib/Listener/SecurityEventListener.php
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace OCA\AdminAudit\Listener;
|
||||
|
||||
use OCA\AdminAudit\Actions\Action;
|
||||
use OCP\Authentication\TwoFactorAuth\TwoFactorProviderChallengeFailed;
|
||||
use OCP\Authentication\TwoFactorAuth\TwoFactorProviderChallengePassed;
|
||||
use OCP\EventDispatcher\Event;
|
||||
use OCP\EventDispatcher\IEventListener;
|
||||
|
||||
/**
|
||||
* @template-implements IEventListener<TwoFactorProviderChallengePassed|TwoFactorProviderChallengeFailed>
|
||||
*/
|
||||
class SecurityEventListener extends Action implements IEventListener {
|
||||
public function handle(Event $event): void {
|
||||
if ($event instanceof TwoFactorProviderChallengePassed) {
|
||||
$this->twoFactorProviderChallengePassed($event);
|
||||
} elseif ($event instanceof TwoFactorProviderChallengeFailed) {
|
||||
$this->twoFactorProviderChallengeFailed($event);
|
||||
}
|
||||
}
|
||||
|
||||
private function twoFactorProviderChallengePassed(TwoFactorProviderChallengePassed $event): void {
|
||||
$this->log(
|
||||
'Successful two factor attempt by user %s (%s) with provider %s',
|
||||
[
|
||||
'uid' => $event->getUser()->getUID(),
|
||||
'displayName' => $event->getUser()->getDisplayName(),
|
||||
'provider' => $event->getProvider()->getDisplayName()
|
||||
],
|
||||
[
|
||||
'displayName',
|
||||
'uid',
|
||||
'provider',
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
private function twoFactorProviderChallengeFailed(TwoFactorProviderChallengeFailed $event): void {
|
||||
$this->log(
|
||||
'Failed two factor attempt by user %s (%s) with provider %s',
|
||||
[
|
||||
'uid' => $event->getUser()->getUID(),
|
||||
'displayName' => $event->getUser()->getDisplayName(),
|
||||
'provider' => $event->getProvider()->getDisplayName()
|
||||
],
|
||||
[
|
||||
'displayName',
|
||||
'uid',
|
||||
'provider',
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
291
apps/admin_audit/lib/Listener/SharingEventListener.php
Normal file
291
apps/admin_audit/lib/Listener/SharingEventListener.php
Normal file
|
|
@ -0,0 +1,291 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace OCA\AdminAudit\Listener;
|
||||
|
||||
use OCA\AdminAudit\Actions\Action;
|
||||
use OCP\EventDispatcher\Event;
|
||||
use OCP\EventDispatcher\IEventListener;
|
||||
use OCP\Share\Events\ShareCreatedEvent;
|
||||
use OCP\Share\Events\ShareDeletedEvent;
|
||||
use OCP\Share\IShare;
|
||||
|
||||
/**
|
||||
* @template-implements IEventListener<ShareCreatedEvent|ShareDeletedEvent>
|
||||
*/
|
||||
class SharingEventListener extends Action implements IEventListener {
|
||||
public function handle(Event $event): void {
|
||||
if ($event instanceof ShareCreatedEvent) {
|
||||
$this->shareCreated($event);
|
||||
} elseif ($event instanceof ShareDeletedEvent) {
|
||||
$this->shareDeleted($event);
|
||||
}
|
||||
}
|
||||
|
||||
private function shareCreated(ShareCreatedEvent $event): void {
|
||||
$share = $event->getShare();
|
||||
|
||||
$params = [
|
||||
'itemType' => $share->getNodeType(),
|
||||
'path' => $share->getNode()->getPath(),
|
||||
'itemSource' => $share->getNodeId(),
|
||||
'shareWith' => $share->getSharedWith(),
|
||||
'permissions' => $share->getPermissions(),
|
||||
'id' => $share->getId()
|
||||
];
|
||||
|
||||
match ($share->getShareType()) {
|
||||
IShare::TYPE_LINK => $this->log(
|
||||
'The %s "%s" with ID "%s" has been shared via link with permissions "%s" (Share ID: %s)',
|
||||
$params,
|
||||
[
|
||||
'itemType',
|
||||
'path',
|
||||
'itemSource',
|
||||
'permissions',
|
||||
'id',
|
||||
]
|
||||
),
|
||||
IShare::TYPE_USER => $this->log(
|
||||
'The %s "%s" with ID "%s" has been shared to the user "%s" with permissions "%s" (Share ID: %s)',
|
||||
$params,
|
||||
[
|
||||
'itemType',
|
||||
'path',
|
||||
'itemSource',
|
||||
'shareWith',
|
||||
'permissions',
|
||||
'id',
|
||||
]
|
||||
),
|
||||
IShare::TYPE_GROUP => $this->log(
|
||||
'The %s "%s" with ID "%s" has been shared to the group "%s" with permissions "%s" (Share ID: %s)',
|
||||
$params,
|
||||
[
|
||||
'itemType',
|
||||
'path',
|
||||
'itemSource',
|
||||
'shareWith',
|
||||
'permissions',
|
||||
'id',
|
||||
]
|
||||
),
|
||||
IShare::TYPE_ROOM => $this->log(
|
||||
'The %s "%s" with ID "%s" has been shared to the room "%s" with permissions "%s" (Share ID: %s)',
|
||||
$params,
|
||||
[
|
||||
'itemType',
|
||||
'path',
|
||||
'itemSource',
|
||||
'shareWith',
|
||||
'permissions',
|
||||
'id',
|
||||
]
|
||||
),
|
||||
IShare::TYPE_EMAIL => $this->log(
|
||||
'The %s "%s" with ID "%s" has been shared to the email recipient "%s" with permissions "%s" (Share ID: %s)',
|
||||
$params,
|
||||
[
|
||||
'itemType',
|
||||
'path',
|
||||
'itemSource',
|
||||
'shareWith',
|
||||
'permissions',
|
||||
'id',
|
||||
]
|
||||
),
|
||||
IShare::TYPE_CIRCLE => $this->log(
|
||||
'The %s "%s" with ID "%s" has been shared to the circle "%s" with permissions "%s" (Share ID: %s)',
|
||||
$params,
|
||||
[
|
||||
'itemType',
|
||||
'path',
|
||||
'itemSource',
|
||||
'shareWith',
|
||||
'permissions',
|
||||
'id',
|
||||
]
|
||||
),
|
||||
IShare::TYPE_REMOTE => $this->log(
|
||||
'The %s "%s" with ID "%s" has been shared to the remote user "%s" with permissions "%s" (Share ID: %s)',
|
||||
$params,
|
||||
[
|
||||
'itemType',
|
||||
'path',
|
||||
'itemSource',
|
||||
'shareWith',
|
||||
'permissions',
|
||||
'id',
|
||||
]
|
||||
),
|
||||
IShare::TYPE_REMOTE_GROUP => $this->log(
|
||||
'The %s "%s" with ID "%s" has been shared to the remote group "%s" with permissions "%s" (Share ID: %s)',
|
||||
$params,
|
||||
[
|
||||
'itemType',
|
||||
'path',
|
||||
'itemSource',
|
||||
'shareWith',
|
||||
'permissions',
|
||||
'id',
|
||||
]
|
||||
),
|
||||
IShare::TYPE_DECK => $this->log(
|
||||
'The %s "%s" with ID "%s" has been shared to the deck card "%s" with permissions "%s" (Share ID: %s)',
|
||||
$params,
|
||||
[
|
||||
'itemType',
|
||||
'path',
|
||||
'itemSource',
|
||||
'shareWith',
|
||||
'permissions',
|
||||
'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
|
||||
};
|
||||
}
|
||||
|
||||
private function shareDeleted(ShareDeletedEvent $event): void {
|
||||
$share = $event->getShare();
|
||||
|
||||
$params = [
|
||||
'itemType' => $share->getNodeType(),
|
||||
'fileTarget' => $share->getTarget(),
|
||||
'itemSource' => $share->getNodeId(),
|
||||
'shareWith' => $share->getSharedWith(),
|
||||
'id' => $share->getId()
|
||||
];
|
||||
|
||||
match ($share->getShareType()) {
|
||||
IShare::TYPE_LINK => $this->log(
|
||||
'The %s "%s" with ID "%s" has been unshared (Share ID: %s)',
|
||||
$params,
|
||||
[
|
||||
'itemType',
|
||||
'fileTarget',
|
||||
'itemSource',
|
||||
'id',
|
||||
]
|
||||
),
|
||||
IShare::TYPE_USER => $this->log(
|
||||
'The %s "%s" with ID "%s" has been unshared from the user "%s" (Share ID: %s)',
|
||||
$params,
|
||||
[
|
||||
'itemType',
|
||||
'fileTarget',
|
||||
'itemSource',
|
||||
'shareWith',
|
||||
'id',
|
||||
]
|
||||
),
|
||||
IShare::TYPE_GROUP => $this->log(
|
||||
'The %s "%s" with ID "%s" has been unshared from the group "%s" (Share ID: %s)',
|
||||
$params,
|
||||
[
|
||||
'itemType',
|
||||
'fileTarget',
|
||||
'itemSource',
|
||||
'shareWith',
|
||||
'id',
|
||||
]
|
||||
),
|
||||
IShare::TYPE_ROOM => $this->log(
|
||||
'The %s "%s" with ID "%s" has been unshared from the room "%s" (Share ID: %s)',
|
||||
$params,
|
||||
[
|
||||
'itemType',
|
||||
'fileTarget',
|
||||
'itemSource',
|
||||
'shareWith',
|
||||
'id',
|
||||
]
|
||||
),
|
||||
IShare::TYPE_EMAIL => $this->log(
|
||||
'The %s "%s" with ID "%s" has been unshared from the email recipient "%s" (Share ID: %s)',
|
||||
$params,
|
||||
[
|
||||
'itemType',
|
||||
'fileTarget',
|
||||
'itemSource',
|
||||
'shareWith',
|
||||
'id',
|
||||
]
|
||||
),
|
||||
IShare::TYPE_CIRCLE => $this->log(
|
||||
'The %s "%s" with ID "%s" has been unshared from the circle "%s" (Share ID: %s)',
|
||||
$params,
|
||||
[
|
||||
'itemType',
|
||||
'fileTarget',
|
||||
'itemSource',
|
||||
'shareWith',
|
||||
'id',
|
||||
]
|
||||
),
|
||||
IShare::TYPE_REMOTE => $this->log(
|
||||
'The %s "%s" with ID "%s" has been unshared from the remote user "%s" (Share ID: %s)',
|
||||
$params,
|
||||
[
|
||||
'itemType',
|
||||
'fileTarget',
|
||||
'itemSource',
|
||||
'shareWith',
|
||||
'id',
|
||||
]
|
||||
),
|
||||
IShare::TYPE_REMOTE_GROUP => $this->log(
|
||||
'The %s "%s" with ID "%s" has been unshared from the remote group "%s" (Share ID: %s)',
|
||||
$params,
|
||||
[
|
||||
'itemType',
|
||||
'fileTarget',
|
||||
'itemSource',
|
||||
'shareWith',
|
||||
'id',
|
||||
]
|
||||
),
|
||||
IShare::TYPE_DECK => $this->log(
|
||||
'The %s "%s" with ID "%s" has been unshared from the deck card "%s" (Share ID: %s)',
|
||||
$params,
|
||||
[
|
||||
'itemType',
|
||||
'fileTarget',
|
||||
'itemSource',
|
||||
'shareWith',
|
||||
'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
|
||||
};
|
||||
}
|
||||
}
|
||||
126
apps/admin_audit/lib/Listener/UserManagementEventListener.php
Normal file
126
apps/admin_audit/lib/Listener/UserManagementEventListener.php
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace OCA\AdminAudit\Listener;
|
||||
|
||||
use OCA\AdminAudit\Actions\Action;
|
||||
use OCP\EventDispatcher\Event;
|
||||
use OCP\EventDispatcher\IEventListener;
|
||||
use OCP\User\Events\PasswordUpdatedEvent;
|
||||
use OCP\User\Events\UserChangedEvent;
|
||||
use OCP\User\Events\UserCreatedEvent;
|
||||
use OCP\User\Events\UserDeletedEvent;
|
||||
use OCP\User\Events\UserIdAssignedEvent;
|
||||
use OCP\User\Events\UserIdUnassignedEvent;
|
||||
|
||||
/**
|
||||
* @template-implements IEventListener<UserCreatedEvent|UserDeletedEvent|UserChangedEvent|PasswordUpdatedEvent|UserIdAssignedEvent|UserIdUnassignedEvent>
|
||||
*/
|
||||
class UserManagementEventListener extends Action implements IEventListener {
|
||||
public function handle(Event $event): void {
|
||||
if ($event instanceof UserCreatedEvent) {
|
||||
$this->userCreated($event);
|
||||
} elseif ($event instanceof UserDeletedEvent) {
|
||||
$this->userDeleted($event);
|
||||
} elseif ($event instanceof UserChangedEvent) {
|
||||
$this->userChanged($event);
|
||||
} elseif ($event instanceof PasswordUpdatedEvent) {
|
||||
$this->passwordUpdated($event);
|
||||
} elseif ($event instanceof UserIdAssignedEvent) {
|
||||
$this->userIdAssigned($event);
|
||||
} elseif ($event instanceof UserIdUnassignedEvent) {
|
||||
$this->userIdUnassigned($event);
|
||||
}
|
||||
}
|
||||
|
||||
private function userCreated(UserCreatedEvent $event): void {
|
||||
$this->log(
|
||||
'User created: "%s"',
|
||||
[
|
||||
'uid' => $event->getUid()
|
||||
],
|
||||
[
|
||||
'uid',
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
private function userDeleted(UserDeletedEvent $event): void {
|
||||
$this->log(
|
||||
'User deleted: "%s"',
|
||||
[
|
||||
'uid' => $event->getUser()->getUID()
|
||||
],
|
||||
[
|
||||
'uid',
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
private function userChanged(UserChangedEvent $event): void {
|
||||
switch ($event->getFeature()) {
|
||||
case 'enabled':
|
||||
$this->log(
|
||||
$event->getValue() === true
|
||||
? 'User enabled: "%s"'
|
||||
: 'User disabled: "%s"',
|
||||
['user' => $event->getUser()->getUID()],
|
||||
[
|
||||
'user',
|
||||
]
|
||||
);
|
||||
break;
|
||||
case 'eMailAddress':
|
||||
$this->log(
|
||||
'Email address changed for user %s',
|
||||
['user' => $event->getUser()->getUID()],
|
||||
[
|
||||
'user',
|
||||
]
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private function passwordUpdated(PasswordUpdatedEvent $event): void {
|
||||
if ($event->getUser()->getBackendClassName() === 'Database') {
|
||||
$this->log(
|
||||
'Password of user "%s" has been changed',
|
||||
[
|
||||
'user' => $event->getUser()->getUID(),
|
||||
],
|
||||
[
|
||||
'user',
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Log assignments of users (typically user backends)
|
||||
*/
|
||||
private function userIdAssigned(UserIdAssignedEvent $event): void {
|
||||
$this->log(
|
||||
'UserID assigned: "%s"',
|
||||
[ 'uid' => $event->getUserId() ],
|
||||
[ 'uid' ]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Log unassignments of users (typically user backends, no data removed)
|
||||
*/
|
||||
private function userIdUnassigned(UserIdUnassignedEvent $event): void {
|
||||
$this->log(
|
||||
'UserID unassigned: "%s"',
|
||||
[ 'uid' => $event->getUserId() ],
|
||||
[ 'uid' ]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,38 +1,47 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
namespace OCA\AdminAudit\Tests\Actions;
|
||||
|
||||
use OCA\AdminAudit\Actions\Security;
|
||||
namespace OCA\AdminAudit\Tests\Listener;
|
||||
|
||||
use OCA\AdminAudit\AuditLogger;
|
||||
use OCA\AdminAudit\Listener\SecurityEventListener;
|
||||
use OCP\Authentication\TwoFactorAuth\IProvider;
|
||||
use OCP\Authentication\TwoFactorAuth\TwoFactorProviderChallengeFailed;
|
||||
use OCP\Authentication\TwoFactorAuth\TwoFactorProviderChallengePassed;
|
||||
use OCP\IUser;
|
||||
use PHPUnit\Framework\MockObject\MockObject;
|
||||
use Test\TestCase;
|
||||
|
||||
class SecurityTest extends TestCase {
|
||||
class SecurityEventListenerTest extends TestCase {
|
||||
private AuditLogger|MockObject $logger;
|
||||
|
||||
private Security $security;
|
||||
private SecurityEventListener $security;
|
||||
|
||||
private MockObject|IUser $user;
|
||||
|
||||
/** @var IProvider&MockObject */
|
||||
private $provider;
|
||||
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
|
||||
$this->logger = $this->createMock(AuditLogger::class);
|
||||
$this->security = new Security($this->logger);
|
||||
$this->security = new SecurityEventListener($this->logger);
|
||||
|
||||
$this->user = $this->createMock(IUser::class);
|
||||
$this->user->method('getUID')->willReturn('myuid');
|
||||
$this->user->method('getDisplayName')->willReturn('mydisplayname');
|
||||
$this->provider = $this->createMock(IProvider::class);
|
||||
$this->provider->method('getDisplayName')->willReturn('myprovider');
|
||||
}
|
||||
|
||||
public function testTwofactorFailed() {
|
||||
public function testTwofactorFailed(): void {
|
||||
$this->logger->expects($this->once())
|
||||
->method('info')
|
||||
->with(
|
||||
|
|
@ -40,14 +49,10 @@ class SecurityTest extends TestCase {
|
|||
['app' => 'admin_audit']
|
||||
);
|
||||
|
||||
$provider = $this->createMock(IProvider::class);
|
||||
$provider->method('getDisplayName')
|
||||
->willReturn('myprovider');
|
||||
|
||||
$this->security->twofactorFailed($this->user, $provider);
|
||||
$this->security->handle(new twoFactorProviderChallengeFailed($this->user, $this->provider));
|
||||
}
|
||||
|
||||
public function testTwofactorSuccess() {
|
||||
public function testTwofactorSuccess(): void {
|
||||
$this->logger->expects($this->once())
|
||||
->method('info')
|
||||
->with(
|
||||
|
|
@ -55,10 +60,6 @@ class SecurityTest extends TestCase {
|
|||
['app' => 'admin_audit']
|
||||
);
|
||||
|
||||
$provider = $this->createMock(IProvider::class);
|
||||
$provider->method('getDisplayName')
|
||||
->willReturn('myprovider');
|
||||
|
||||
$this->security->twofactorSuccess($this->user, $provider);
|
||||
$this->security->handle(new TwoFactorProviderChallengePassed($this->user, $this->provider));
|
||||
}
|
||||
}
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
<name>Cloud Federation API</name>
|
||||
<summary>Enable clouds to communicate with each other and exchange data</summary>
|
||||
<description>The Cloud Federation API enables various Nextcloud instances to communicate with each other and to exchange data.</description>
|
||||
<version>1.13.0</version>
|
||||
<version>1.14.0</version>
|
||||
<licence>agpl</licence>
|
||||
<author>Bjoern Schiessle</author>
|
||||
<namespace>CloudFederationAPI</namespace>
|
||||
|
|
@ -19,6 +19,6 @@
|
|||
<category>integration</category>
|
||||
<bugs>https://github.com/nextcloud/server/issues</bugs>
|
||||
<dependencies>
|
||||
<nextcloud min-version="30" max-version="30"/>
|
||||
<nextcloud min-version="31" max-version="31"/>
|
||||
</dependencies>
|
||||
</info>
|
||||
|
|
|
|||
|
|
@ -55,8 +55,8 @@ class Capabilities implements ICapability {
|
|||
|
||||
$resource = $this->provider->createNewResourceType();
|
||||
$resource->setName('file')
|
||||
->setShareTypes(['user', 'group'])
|
||||
->setProtocols(['webdav' => '/public.php/webdav/']);
|
||||
->setShareTypes(['user', 'group'])
|
||||
->setProtocols(['webdav' => '/public.php/webdav/']);
|
||||
|
||||
$this->provider->addResourceType($resource);
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,10 @@ use OCA\CloudFederationAPI\Config;
|
|||
use OCA\CloudFederationAPI\ResponseDefinitions;
|
||||
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\OpenAPI;
|
||||
use OCP\AppFramework\Http\Attribute\PublicPage;
|
||||
use OCP\AppFramework\Http\JSONResponse;
|
||||
use OCP\Federation\Exceptions\ActionNotSupportedException;
|
||||
use OCP\Federation\Exceptions\AuthenticationFailedException;
|
||||
|
|
@ -55,10 +58,6 @@ class RequestHandlerController extends Controller {
|
|||
/**
|
||||
* Add share
|
||||
*
|
||||
* @NoCSRFRequired
|
||||
* @PublicPage
|
||||
* @BruteForceProtection(action=receiveFederatedShare)
|
||||
*
|
||||
* @param string $shareWith The user who the share will be shared with
|
||||
* @param string $name The resource name (e.g. document.odt)
|
||||
* @param string|null $description Share description
|
||||
|
|
@ -72,10 +71,14 @@ class RequestHandlerController extends Controller {
|
|||
* @param string $resourceType 'file', 'calendar',...
|
||||
*
|
||||
* @return JSONResponse<Http::STATUS_CREATED, CloudFederationAPIAddShare, array{}>|JSONResponse<Http::STATUS_BAD_REQUEST, CloudFederationAPIValidationError, array{}>|JSONResponse<Http::STATUS_NOT_IMPLEMENTED, CloudFederationAPIError, array{}>
|
||||
*
|
||||
* 201: The notification was successfully received. The display name of the recipient might be returned in the body
|
||||
* 400: Bad request due to invalid parameters, e.g. when `shareWith` is not found or required properties are missing
|
||||
* 501: Share type or the resource type is not supported
|
||||
*/
|
||||
#[PublicPage]
|
||||
#[NoCSRFRequired]
|
||||
#[BruteForceProtection(action: 'receiveFederatedShare')]
|
||||
public function addShare($shareWith, $name, $description, $providerId, $owner, $ownerDisplayName, $sharedBy, $sharedByDisplayName, $protocol, $shareType, $resourceType) {
|
||||
// check if all required parameters are set
|
||||
if ($shareWith === null ||
|
||||
|
|
@ -171,35 +174,38 @@ class RequestHandlerController extends Controller {
|
|||
);
|
||||
}
|
||||
|
||||
$user = $this->userManager->get($shareWith);
|
||||
$recipientDisplayName = '';
|
||||
if ($user) {
|
||||
$recipientDisplayName = $user->getDisplayName();
|
||||
$responseData = ['recipientDisplayName' => ''];
|
||||
if ($shareType === 'user') {
|
||||
$user = $this->userManager->get($shareWith);
|
||||
if ($user) {
|
||||
$responseData = [
|
||||
'recipientDisplayName' => $user->getDisplayName(),
|
||||
'recipientUserId' => $user->getUID(),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
return new JSONResponse(
|
||||
['recipientDisplayName' => $recipientDisplayName],
|
||||
Http::STATUS_CREATED);
|
||||
return new JSONResponse($responseData, Http::STATUS_CREATED);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a notification about an existing share
|
||||
*
|
||||
* @NoCSRFRequired
|
||||
* @PublicPage
|
||||
* @BruteForceProtection(action=receiveFederatedShareNotification)
|
||||
*
|
||||
* @param string $notificationType Notification type, e.g. SHARE_ACCEPTED
|
||||
* @param string $resourceType calendar, file, contact,...
|
||||
* @param string|null $providerId ID of the share
|
||||
* @param array<string, mixed>|null $notification The actual payload of the notification
|
||||
*
|
||||
* @return JSONResponse<Http::STATUS_CREATED, array<string, mixed>, array{}>|JSONResponse<Http::STATUS_BAD_REQUEST, CloudFederationAPIValidationError, array{}>|JSONResponse<Http::STATUS_FORBIDDEN|Http::STATUS_NOT_IMPLEMENTED, CloudFederationAPIError, array{}>
|
||||
*
|
||||
* 201: The notification was successfully received
|
||||
* 400: Bad request due to invalid parameters, e.g. when `type` is invalid or missing
|
||||
* 403: Getting resource is not allowed
|
||||
* 501: The resource type is not supported
|
||||
*/
|
||||
#[NoCSRFRequired]
|
||||
#[PublicPage]
|
||||
#[BruteForceProtection(action: 'receiveFederatedShareNotification')]
|
||||
public function receiveNotification($notificationType, $resourceType, $providerId, ?array $notification) {
|
||||
// check if all required parameters are set
|
||||
if ($notificationType === null ||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ namespace OCA\CloudFederationAPI;
|
|||
/**
|
||||
* @psalm-type CloudFederationAPIAddShare = array{
|
||||
* recipientDisplayName: string,
|
||||
* recipientUserId?: string,
|
||||
* }
|
||||
*
|
||||
* @psalm-type CloudFederationAPIError = array{
|
||||
|
|
|
|||
|
|
@ -28,6 +28,9 @@
|
|||
"properties": {
|
||||
"recipientDisplayName": {
|
||||
"type": "string"
|
||||
},
|
||||
"recipientUserId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<name>Comments</name>
|
||||
<summary>Files app plugin to add comments to files</summary>
|
||||
<description>Files app plugin to add comments to files</description>
|
||||
<version>1.20.0</version>
|
||||
<version>1.21.0</version>
|
||||
<licence>agpl</licence>
|
||||
<author>Arthur Schiwon</author>
|
||||
<author>Vincent Petry</author>
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
<category>social</category>
|
||||
<bugs>https://github.com/nextcloud/server/issues</bugs>
|
||||
<dependencies>
|
||||
<nextcloud min-version="30" max-version="30"/>
|
||||
<nextcloud min-version="31" max-version="31"/>
|
||||
</dependencies>
|
||||
|
||||
<activity>
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
<svg viewBox="0 0 32 32" height="32" width="32" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"><path d="M2 22V4c0-.55.196-1.021.588-1.413A1.925 1.925 0 0 1 4 2h16c.55 0 1.021.196 1.413.587.391.392.587.863.587 1.413v12a1.931 1.931 0 0 1-.587 1.413c-.37.382-.881.594-1.413.587H6l-4 4Zm4-8h8v-2H6v2Zm0-3h12V9H6v2Zm0-3h12V6H6v2Z" style="fill-rule:nonzero" transform="translate(-.8 -.8) scale(1.39999)"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 -960 960 960" width="20px"><path d="M240-384h480v-72H240v72Zm0-132h480v-72H240v72Zm0-132h480v-72H240v72Zm-72 408q-29.7 0-50.85-21.15Q96-282.3 96-312v-480q0-29.7 21.15-50.85Q138.3-864 168-864h624q29.7 0 50.85 21.15Q864-821.7 864-792v696L720-240H168Z"/></svg>
|
||||
|
Before Width: | Height: | Size: 500 B After Width: | Height: | Size: 322 B |
|
|
@ -1 +1 @@
|
|||
<svg viewBox="0 0 32 32" height="32" width="32" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"><path d="M2 22V4c0-.55.196-1.021.588-1.413A1.925 1.925 0 0 1 4 2h16c.55 0 1.021.196 1.413.587.391.392.587.863.587 1.413v12a1.931 1.931 0 0 1-.587 1.413c-.37.382-.881.594-1.413.587H6l-4 4Zm4-8h8v-2H6v2Zm0-3h12V9H6v2Zm0-3h12V6H6v2Z" style="fill:#fff;fill-rule:nonzero" transform="translate(-.8 -.8) scale(1.39999)"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="20px" viewBox="0 -960 960 960" width="20px" fill="#fff"><path d="M240-384h480v-72H240v72Zm0-132h480v-72H240v72Zm0-132h480v-72H240v72Zm-72 408q-29.7 0-50.85-21.15Q96-282.3 96-312v-480q0-29.7 21.15-50.85Q138.3-864 168-864h624q29.7 0 50.85 21.15Q864-821.7 864-792v696L720-240H168Z"/></svg>
|
||||
|
Before Width: | Height: | Size: 510 B After Width: | Height: | Size: 334 B |
|
|
@ -9,6 +9,7 @@ OC.L10N.register(
|
|||
"%1$s commented on %2$s" : "%1$s كتب تعليق على %2$s",
|
||||
"{author} commented on {file}" : "{author} علّق على {file}",
|
||||
"<strong>Comments</strong> for files" : "<strong>تعليقات</strong> على الملفات",
|
||||
"Files" : "الملفّات",
|
||||
"You were mentioned on \"{file}\", in a comment by an account that has since been deleted" : "تمت الإشارة إليك في \"{file}\"، في تعليقٍ من قِبَل حسابٍ تمّ حذفه سلفاً",
|
||||
"{user} mentioned you in a comment on \"{file}\"" : "أشار إليك {user} في تعليق على {file}",
|
||||
"Files app plugin to add comments to files" : "المكوِّن الإضافي لتطبيق الملفات لإضافة تعليقات إلى الملفات",
|
||||
|
|
@ -31,9 +32,6 @@ OC.L10N.register(
|
|||
"Comment deleted" : "التعليق محذوف",
|
||||
"An error occurred while trying to delete the comment" : "حدث خطأ أثناء محاولة حذف التعليق",
|
||||
"An error occurred while trying to create the comment" : "حدث خطأ أثناء محاولة إنشاء التعليق",
|
||||
"You were mentioned on \"{file}\", in a comment by a user that has since been deleted" : "تمت الإشارة إليك في \"{file}\" في تعليق لمستخدم. لكن هذا المستخدم تم حذف حسابه بعدها",
|
||||
"Write a message …" : "أكتُب رسالةً ...",
|
||||
"\"@\" for mentions, \":\" for emoji, \"/\" for smart picker" : "\"@\" للإشارات, \":\" للإيموجي, \"/\" للاقط الذكي",
|
||||
"_%n unread comment_::_%n unread comments_" : ["%n تعليق غير مقروء","%n تعليق غير مقروء","تعليقان غير مقروءة","%n تعليقات غير مقروء","%n تعليق غير مقروء","%n تعليق غير مقروء"]
|
||||
"You were mentioned on \"{file}\", in a comment by a user that has since been deleted" : "تمت الإشارة إليك في \"{file}\" في تعليق لمستخدم. لكن هذا المستخدم تم حذف حسابه بعدها"
|
||||
},
|
||||
"nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;");
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
"%1$s commented on %2$s" : "%1$s كتب تعليق على %2$s",
|
||||
"{author} commented on {file}" : "{author} علّق على {file}",
|
||||
"<strong>Comments</strong> for files" : "<strong>تعليقات</strong> على الملفات",
|
||||
"Files" : "الملفّات",
|
||||
"You were mentioned on \"{file}\", in a comment by an account that has since been deleted" : "تمت الإشارة إليك في \"{file}\"، في تعليقٍ من قِبَل حسابٍ تمّ حذفه سلفاً",
|
||||
"{user} mentioned you in a comment on \"{file}\"" : "أشار إليك {user} في تعليق على {file}",
|
||||
"Files app plugin to add comments to files" : "المكوِّن الإضافي لتطبيق الملفات لإضافة تعليقات إلى الملفات",
|
||||
|
|
@ -29,9 +30,6 @@
|
|||
"Comment deleted" : "التعليق محذوف",
|
||||
"An error occurred while trying to delete the comment" : "حدث خطأ أثناء محاولة حذف التعليق",
|
||||
"An error occurred while trying to create the comment" : "حدث خطأ أثناء محاولة إنشاء التعليق",
|
||||
"You were mentioned on \"{file}\", in a comment by a user that has since been deleted" : "تمت الإشارة إليك في \"{file}\" في تعليق لمستخدم. لكن هذا المستخدم تم حذف حسابه بعدها",
|
||||
"Write a message …" : "أكتُب رسالةً ...",
|
||||
"\"@\" for mentions, \":\" for emoji, \"/\" for smart picker" : "\"@\" للإشارات, \":\" للإيموجي, \"/\" للاقط الذكي",
|
||||
"_%n unread comment_::_%n unread comments_" : ["%n تعليق غير مقروء","%n تعليق غير مقروء","تعليقان غير مقروءة","%n تعليقات غير مقروء","%n تعليق غير مقروء","%n تعليق غير مقروء"]
|
||||
"You were mentioned on \"{file}\", in a comment by a user that has since been deleted" : "تمت الإشارة إليك في \"{file}\" في تعليق لمستخدم. لكن هذا المستخدم تم حذف حسابه بعدها"
|
||||
},"pluralForm" :"nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;"
|
||||
}
|
||||
|
|
@ -9,6 +9,7 @@ OC.L10N.register(
|
|||
"%1$s commented on %2$s" : "%1$s comentó en: %2$s",
|
||||
"{author} commented on {file}" : "{author} comentó en: {file}",
|
||||
"<strong>Comments</strong> for files" : "<strong>Comentarios</strong> pa ficheros",
|
||||
"Files" : "Ficheros",
|
||||
"You were mentioned on \"{file}\", in a comment by an account that has since been deleted" : "Mentáronte en «{file}», nun comentariu d'una cuenta que ta desaniciada",
|
||||
"{user} mentioned you in a comment on \"{file}\"" : "{user} mentóte nun comentariu de: «{file}»",
|
||||
"Files app plugin to add comments to files" : "Plugin de l'aplicación Ficheros p'amestar comentarios a los ficheros",
|
||||
|
|
@ -31,9 +32,6 @@ OC.L10N.register(
|
|||
"Comment deleted" : "Desanicióse'l comentariu",
|
||||
"An error occurred while trying to delete the comment" : "Prodúxose un error mentanto se tentaba de desaniciar el comentariu",
|
||||
"An error occurred while trying to create the comment" : "Prodúxose un error mentanto se tentaba de crear el comentariu",
|
||||
"You were mentioned on \"{file}\", in a comment by a user that has since been deleted" : "Un usuariu que ta desaniciáu mentóte nun comentariu de: {file}",
|
||||
"Write a message …" : "Escribi un mensaxe…",
|
||||
"\"@\" for mentions, \":\" for emoji, \"/\" for smart picker" : "«@» pa mentar, «.» p'amestar un fustaxe, «/» pa usar el selector intelixente",
|
||||
"_%n unread comment_::_%n unread comments_" : ["%n comentariu ensin lleer","%n comentarios ensin lleer"]
|
||||
"You were mentioned on \"{file}\", in a comment by a user that has since been deleted" : "Un usuariu que ta desaniciáu mentóte nun comentariu de: {file}"
|
||||
},
|
||||
"nplurals=2; plural=(n != 1);");
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
"%1$s commented on %2$s" : "%1$s comentó en: %2$s",
|
||||
"{author} commented on {file}" : "{author} comentó en: {file}",
|
||||
"<strong>Comments</strong> for files" : "<strong>Comentarios</strong> pa ficheros",
|
||||
"Files" : "Ficheros",
|
||||
"You were mentioned on \"{file}\", in a comment by an account that has since been deleted" : "Mentáronte en «{file}», nun comentariu d'una cuenta que ta desaniciada",
|
||||
"{user} mentioned you in a comment on \"{file}\"" : "{user} mentóte nun comentariu de: «{file}»",
|
||||
"Files app plugin to add comments to files" : "Plugin de l'aplicación Ficheros p'amestar comentarios a los ficheros",
|
||||
|
|
@ -29,9 +30,6 @@
|
|||
"Comment deleted" : "Desanicióse'l comentariu",
|
||||
"An error occurred while trying to delete the comment" : "Prodúxose un error mentanto se tentaba de desaniciar el comentariu",
|
||||
"An error occurred while trying to create the comment" : "Prodúxose un error mentanto se tentaba de crear el comentariu",
|
||||
"You were mentioned on \"{file}\", in a comment by a user that has since been deleted" : "Un usuariu que ta desaniciáu mentóte nun comentariu de: {file}",
|
||||
"Write a message …" : "Escribi un mensaxe…",
|
||||
"\"@\" for mentions, \":\" for emoji, \"/\" for smart picker" : "«@» pa mentar, «.» p'amestar un fustaxe, «/» pa usar el selector intelixente",
|
||||
"_%n unread comment_::_%n unread comments_" : ["%n comentariu ensin lleer","%n comentarios ensin lleer"]
|
||||
"You were mentioned on \"{file}\", in a comment by a user that has since been deleted" : "Un usuariu que ta desaniciáu mentóte nun comentariu de: {file}"
|
||||
},"pluralForm" :"nplurals=2; plural=(n != 1);"
|
||||
}
|
||||
|
|
@ -9,6 +9,7 @@ OC.L10N.register(
|
|||
"%1$s commented on %2$s" : "%1$s коментиран за %2$s",
|
||||
"{author} commented on {file}" : "{author} коментира за {file}",
|
||||
"<strong>Comments</strong> for files" : "<strong>Коментари</strong> за файлове",
|
||||
"Files" : "Файлове",
|
||||
"{user} mentioned you in a comment on \"{file}\"" : "{user} ви спомена в коментар за “{file}”",
|
||||
"Files app plugin to add comments to files" : "Добавка на приложението Файлове за добавяне на коментари към файловете",
|
||||
"Edit comment" : "Редактирай коментра",
|
||||
|
|
@ -25,7 +26,6 @@ OC.L10N.register(
|
|||
"Comment deleted" : " Изтрит е коментар",
|
||||
"An error occurred while trying to delete the comment" : "Възникна грешка при опит за изтриване на коментара",
|
||||
"An error occurred while trying to create the comment" : "Възникна грешка при опит за създаване на коментар",
|
||||
"You were mentioned on \"{file}\", in a comment by a user that has since been deleted" : "Бяхте споменат/а към “{file}”, в коментар от потребител, който вече е изтрит",
|
||||
"_%n unread comment_::_%n unread comments_" : ["%n непрочетен коментар","%n непрочетени коментари"]
|
||||
"You were mentioned on \"{file}\", in a comment by a user that has since been deleted" : "Бяхте споменат/а към “{file}”, в коментар от потребител, който вече е изтрит"
|
||||
},
|
||||
"nplurals=2; plural=(n != 1);");
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
"%1$s commented on %2$s" : "%1$s коментиран за %2$s",
|
||||
"{author} commented on {file}" : "{author} коментира за {file}",
|
||||
"<strong>Comments</strong> for files" : "<strong>Коментари</strong> за файлове",
|
||||
"Files" : "Файлове",
|
||||
"{user} mentioned you in a comment on \"{file}\"" : "{user} ви спомена в коментар за “{file}”",
|
||||
"Files app plugin to add comments to files" : "Добавка на приложението Файлове за добавяне на коментари към файловете",
|
||||
"Edit comment" : "Редактирай коментра",
|
||||
|
|
@ -23,7 +24,6 @@
|
|||
"Comment deleted" : " Изтрит е коментар",
|
||||
"An error occurred while trying to delete the comment" : "Възникна грешка при опит за изтриване на коментара",
|
||||
"An error occurred while trying to create the comment" : "Възникна грешка при опит за създаване на коментар",
|
||||
"You were mentioned on \"{file}\", in a comment by a user that has since been deleted" : "Бяхте споменат/а към “{file}”, в коментар от потребител, който вече е изтрит",
|
||||
"_%n unread comment_::_%n unread comments_" : ["%n непрочетен коментар","%n непрочетени коментари"]
|
||||
"You were mentioned on \"{file}\", in a comment by a user that has since been deleted" : "Бяхте споменат/а към “{file}”, в коментар от потребител, който вече е изтрит"
|
||||
},"pluralForm" :"nplurals=2; plural=(n != 1);"
|
||||
}
|
||||
|
|
@ -9,6 +9,7 @@ OC.L10N.register(
|
|||
"%1$s commented on %2$s" : "%1$s ha escrit un comentari a %2$s",
|
||||
"{author} commented on {file}" : "{author} ha escrit un comentari a {file}",
|
||||
"<strong>Comments</strong> for files" : "<strong>Comentaris</strong> per a fitxers",
|
||||
"Files" : "Fitxers",
|
||||
"You were mentioned on \"{file}\", in a comment by an account that has since been deleted" : "Se us ha esmentat a «{file}» en un comentari d'un compte que s'ha suprimit",
|
||||
"{user} mentioned you in a comment on \"{file}\"" : "{user} us ha esmentat en un comentari a «{file}»",
|
||||
"Files app plugin to add comments to files" : "Connector de l'aplicació Fitxers per a afegir comentaris als fitxers",
|
||||
|
|
@ -31,9 +32,6 @@ OC.L10N.register(
|
|||
"Comment deleted" : "S'ha suprimit el comentari",
|
||||
"An error occurred while trying to delete the comment" : "S'ha produït un error en intentar suprimir el comentari",
|
||||
"An error occurred while trying to create the comment" : "S'ha produït un error en intentar crear el comentari",
|
||||
"You were mentioned on \"{file}\", in a comment by a user that has since been deleted" : "Se us ha esmentat a «{file}» en un comentari d'un usuari que s'ha suprimit",
|
||||
"Write a message …" : "Escriviu un missatge…",
|
||||
"\"@\" for mentions, \":\" for emoji, \"/\" for smart picker" : "«@» per a mencions, «:» per a emojis, «/» per al selector intel·ligent",
|
||||
"_%n unread comment_::_%n unread comments_" : ["%n comentari sense llegir","%n comentaris sense llegir"]
|
||||
"You were mentioned on \"{file}\", in a comment by a user that has since been deleted" : "Se us ha esmentat a «{file}» en un comentari d'un usuari que s'ha suprimit"
|
||||
},
|
||||
"nplurals=2; plural=(n != 1);");
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue