diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2021-10-14 16:16:11 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-14 16:16:11 +0300 |
commit | d2f0cca26fd8ec07051493bb8e0216413f69b605 (patch) | |
tree | 1fa18b2712524254eb22e03f4cbb056049e4dbf2 | |
parent | 102568ca9f557bdd2b3663db2a3081acfcee50de (diff) | |
parent | fb09edfd03990ab52cd4d6290c75f4fc74fb6ee0 (diff) |
Merge pull request #215 from nextcloud/backport/214/stable22v1.12.1
[stable22] Block access in groupfolder trashbin
-rw-r--r-- | .github/workflows/phpunit.yml | 2 | ||||
-rw-r--r-- | appinfo/info.xml | 2 | ||||
-rw-r--r-- | lib/Operation.php | 5 |
3 files changed, 7 insertions, 2 deletions
diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index d748d73..6ad6447 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -79,7 +79,7 @@ jobs: services: mysql: - image: mariadb + image: mariadb:10.5 ports: - 4444:3306/tcp env: diff --git a/appinfo/info.xml b/appinfo/info.xml index eebb518..d35938f 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -13,7 +13,7 @@ An example would be to deny access to MS Excel/XLSX files owned by the "Human Re Learn more about File Access Control on [https://nextcloud.com/workflow](https://nextcloud.com/workflow)</description> - <version>1.12.0</version> + <version>1.12.1</version> <licence>agpl</licence> <author>Morris Jobke</author> <namespace>FilesAccessControl</namespace> diff --git a/lib/Operation.php b/lib/Operation.php index 9ec69dc..2302d4b 100644 --- a/lib/Operation.php +++ b/lib/Operation.php @@ -114,6 +114,11 @@ class Operation implements IComplexOperation, ISpecificOperation { // '', admin, 'files', 'path/to/file.txt' $segment = explode('/', $fullPath, 4); + if (isset($segment[2]) && $segment[1] === '__groupfolders' && $segment[2] === 'trash') { + // Special case, a file was deleted inside a groupfolder + return true; + } + return isset($segment[2]) && in_array($segment[2], [ 'files', 'thumbnails', |