diff --git a/.drone.yml b/.drone.yml index 122ab5e906..ecac12bba5 100644 --- a/.drone.yml +++ b/.drone.yml @@ -488,7 +488,7 @@ steps: - git clone -b master --depth=1 https://github.com/owncloud/testing.git /drone/src/tmp/testing - git clone -b master --single-branch --no-tags https://github.com/owncloud/core.git /drone/src/tmp/testrunner - cd /drone/src/tmp/testrunner - - git checkout 85da111d5ec5660f7294a789304b4bfc32580d95 + - git checkout cedf060d9dbb7ffc859a0eb425cfa8cc51f172a9 - name: localAPIAcceptanceTestsOwncloudStorage image: registry.cern.ch/docker.io/owncloudci/php:7.4 @@ -562,7 +562,7 @@ steps: - git clone -b master --depth=1 https://github.com/owncloud/testing.git /drone/src/tmp/testing - git clone -b master --single-branch --no-tags https://github.com/owncloud/core.git /drone/src/tmp/testrunner - cd /drone/src/tmp/testrunner - - git checkout 85da111d5ec5660f7294a789304b4bfc32580d95 + - git checkout cedf060d9dbb7ffc859a0eb425cfa8cc51f172a9 - name: localAPIAcceptanceTestsOcisStorage image: registry.cern.ch/docker.io/owncloudci/php:7.4 @@ -631,7 +631,7 @@ steps: - git clone -b master --depth=1 https://github.com/owncloud/testing.git /drone/src/tmp/testing - git clone -b master --single-branch --no-tags https://github.com/owncloud/core.git /drone/src/tmp/testrunner - cd /drone/src/tmp/testrunner - - git checkout 85da111d5ec5660f7294a789304b4bfc32580d95 + - git checkout cedf060d9dbb7ffc859a0eb425cfa8cc51f172a9 - name: oC10APIAcceptanceTestsOcisStorage image: registry.cern.ch/docker.io/owncloudci/php:7.4 @@ -703,7 +703,7 @@ steps: - git clone -b master --depth=1 https://github.com/owncloud/testing.git /drone/src/tmp/testing - git clone -b master --single-branch --no-tags https://github.com/owncloud/core.git /drone/src/tmp/testrunner - cd /drone/src/tmp/testrunner - - git checkout 85da111d5ec5660f7294a789304b4bfc32580d95 + - git checkout cedf060d9dbb7ffc859a0eb425cfa8cc51f172a9 - name: oC10APIAcceptanceTestsOcisStorage image: registry.cern.ch/docker.io/owncloudci/php:7.4 @@ -775,7 +775,7 @@ steps: - git clone -b master --depth=1 https://github.com/owncloud/testing.git /drone/src/tmp/testing - git clone -b master --single-branch --no-tags https://github.com/owncloud/core.git /drone/src/tmp/testrunner - cd /drone/src/tmp/testrunner - - git checkout 85da111d5ec5660f7294a789304b4bfc32580d95 + - git checkout cedf060d9dbb7ffc859a0eb425cfa8cc51f172a9 - name: oC10APIAcceptanceTestsOcisStorage image: registry.cern.ch/docker.io/owncloudci/php:7.4 @@ -847,7 +847,7 @@ steps: - git clone -b master --depth=1 https://github.com/owncloud/testing.git /drone/src/tmp/testing - git clone -b master --single-branch --no-tags https://github.com/owncloud/core.git /drone/src/tmp/testrunner - cd /drone/src/tmp/testrunner - - git checkout 85da111d5ec5660f7294a789304b4bfc32580d95 + - git checkout cedf060d9dbb7ffc859a0eb425cfa8cc51f172a9 - name: oC10APIAcceptanceTestsOcisStorage image: registry.cern.ch/docker.io/owncloudci/php:7.4 @@ -919,7 +919,7 @@ steps: - git clone -b master --depth=1 https://github.com/owncloud/testing.git /drone/src/tmp/testing - git clone -b master --single-branch --no-tags https://github.com/owncloud/core.git /drone/src/tmp/testrunner - cd /drone/src/tmp/testrunner - - git checkout 85da111d5ec5660f7294a789304b4bfc32580d95 + - git checkout cedf060d9dbb7ffc859a0eb425cfa8cc51f172a9 - name: oC10APIAcceptanceTestsOcisStorage image: registry.cern.ch/docker.io/owncloudci/php:7.4 @@ -991,7 +991,7 @@ steps: - git clone -b master --depth=1 https://github.com/owncloud/testing.git /drone/src/tmp/testing - git clone -b master --single-branch --no-tags https://github.com/owncloud/core.git /drone/src/tmp/testrunner - cd /drone/src/tmp/testrunner - - git checkout 85da111d5ec5660f7294a789304b4bfc32580d95 + - git checkout cedf060d9dbb7ffc859a0eb425cfa8cc51f172a9 - name: oC10APIAcceptanceTestsOcisStorage image: registry.cern.ch/docker.io/owncloudci/php:7.4 @@ -1063,7 +1063,7 @@ steps: - git clone -b master --depth=1 https://github.com/owncloud/testing.git /drone/src/tmp/testing - git clone -b master --single-branch --no-tags https://github.com/owncloud/core.git /drone/src/tmp/testrunner - cd /drone/src/tmp/testrunner - - git checkout 85da111d5ec5660f7294a789304b4bfc32580d95 + - git checkout cedf060d9dbb7ffc859a0eb425cfa8cc51f172a9 - name: oC10APIAcceptanceTestsOwncloudStorage image: registry.cern.ch/docker.io/owncloudci/php:7.4 @@ -1140,7 +1140,7 @@ steps: - git clone -b master --depth=1 https://github.com/owncloud/testing.git /drone/src/tmp/testing - git clone -b master --single-branch --no-tags https://github.com/owncloud/core.git /drone/src/tmp/testrunner - cd /drone/src/tmp/testrunner - - git checkout 85da111d5ec5660f7294a789304b4bfc32580d95 + - git checkout cedf060d9dbb7ffc859a0eb425cfa8cc51f172a9 - name: oC10APIAcceptanceTestsOwncloudStorage image: registry.cern.ch/docker.io/owncloudci/php:7.4 @@ -1217,7 +1217,7 @@ steps: - git clone -b master --depth=1 https://github.com/owncloud/testing.git /drone/src/tmp/testing - git clone -b master --single-branch --no-tags https://github.com/owncloud/core.git /drone/src/tmp/testrunner - cd /drone/src/tmp/testrunner - - git checkout 85da111d5ec5660f7294a789304b4bfc32580d95 + - git checkout cedf060d9dbb7ffc859a0eb425cfa8cc51f172a9 - name: oC10APIAcceptanceTestsOwncloudStorage image: registry.cern.ch/docker.io/owncloudci/php:7.4 @@ -1294,7 +1294,7 @@ steps: - git clone -b master --depth=1 https://github.com/owncloud/testing.git /drone/src/tmp/testing - git clone -b master --single-branch --no-tags https://github.com/owncloud/core.git /drone/src/tmp/testrunner - cd /drone/src/tmp/testrunner - - git checkout 85da111d5ec5660f7294a789304b4bfc32580d95 + - git checkout cedf060d9dbb7ffc859a0eb425cfa8cc51f172a9 - name: oC10APIAcceptanceTestsOwncloudStorage image: registry.cern.ch/docker.io/owncloudci/php:7.4 @@ -1371,7 +1371,7 @@ steps: - git clone -b master --depth=1 https://github.com/owncloud/testing.git /drone/src/tmp/testing - git clone -b master --single-branch --no-tags https://github.com/owncloud/core.git /drone/src/tmp/testrunner - cd /drone/src/tmp/testrunner - - git checkout 85da111d5ec5660f7294a789304b4bfc32580d95 + - git checkout cedf060d9dbb7ffc859a0eb425cfa8cc51f172a9 - name: oC10APIAcceptanceTestsOwncloudStorage image: registry.cern.ch/docker.io/owncloudci/php:7.4 @@ -1448,7 +1448,7 @@ steps: - git clone -b master --depth=1 https://github.com/owncloud/testing.git /drone/src/tmp/testing - git clone -b master --single-branch --no-tags https://github.com/owncloud/core.git /drone/src/tmp/testrunner - cd /drone/src/tmp/testrunner - - git checkout 85da111d5ec5660f7294a789304b4bfc32580d95 + - git checkout cedf060d9dbb7ffc859a0eb425cfa8cc51f172a9 - name: oC10APIAcceptanceTestsOwncloudStorage image: registry.cern.ch/docker.io/owncloudci/php:7.4 diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ed32497b0..fa8d971d44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,309 @@ +Changelog for reva 1.5.0 (2021-01-12) +======================================= + +The following sections list the changes in reva 1.5.0 relevant to +reva users. The changes are ordered by importance. + +Summary +------- + + * Fix #1385: Run changelog check only if there are changes in the code + * Fix #1333: Delete sdk unit tests + * Fix #1342: Dav endpoint routing to home storage when request is remote.php/dav/files + * Fix #1338: Fix fd leaks + * Fix #1343: Fix ocis move + * Fix #551: Fix purging deleted files with the ocis storage + * Fix #863: Fix dav api for trashbin + * Fix #204: Fix the ocs share with me response + * Fix #1351: Fix xattr.Remove error check for macOS + * Fix #1320: Do not panic on remote.php/dav/files/ + * Fix #1379: Make Jaeger agent usable + * Fix #1331: Fix capabilities response for multiple client versions + * Fix #1281: When sharing via ocs look up user by username + * Fix #1334: Handle removal of public shares by token or ID + * Chg #990: Replace the user uuid with the username in ocs share responses + * Enh #1350: Add auth protocol based on user agent + * Enh #1362: Mark 'store-dev-release' CI step as failed on 4XX/5XX errors + * Enh #1364: Remove expired Link on Get + * Enh #1340: Add cache to store UID to UserID mapping in EOS + * Enh #1154: Add support for the protobuf interface to eos metadata + * Enh #1154: Merge-rebase from master 10/11/2020 + * Enh #1359: Add cache for calculated etags for home and shares directory + * Enh #1321: Add support for multiple data transfer protocols + * Enh #1324: Log expected errors with debug level + * Enh #1351: Map errtypes to status + * Enh #1347: Support property to enable health checking on a service + * Enh #1332: Add import support to Mentix + * Enh #1371: Use self-hosted Drone CI + * Enh #1354: Map bad request and unimplement to http status codes + * Enh #929: Include share types in ocs propfind responses + * Enh #1328: Add CLI commands for public shares + * Enh #1388: Support range header in GET requests + * Enh #1361: Remove expired Link on Access + * Enh #1386: Docker image for cs3org/revad:VERSION-eos + * Enh #1368: Calculate and expose actual file permission set + +Details +------- + + * Bugfix #1385: Run changelog check only if there are changes in the code + + https://github.com/cs3org/reva/pull/1385 + + * Bugfix #1333: Delete sdk unit tests + + These depend on a remote server running reva and thus fail in case of version mismatches. + + https://github.com/cs3org/reva/pull/1333 + + * Bugfix #1342: Dav endpoint routing to home storage when request is remote.php/dav/files + + There was a regression in which we were not routing correctly to the right storage depending on + the url. + + https://github.com/cs3org/reva/pull/1342 + + * Bugfix #1338: Fix fd leaks + + There were some left over open file descriptors on simple.go. + + https://github.com/cs3org/reva/pull/1338 + + * Bugfix #1343: Fix ocis move + + Use the old node id to build the target path for xattr updates. + + https://github.com/owncloud/ocis/issues/975 + https://github.com/cs3org/reva/pull/1343 + + * Bugfix #551: Fix purging deleted files with the ocis storage + + The ocis storage could load the owner information of a deleted file. This caused the storage to + not be able to purge deleted files. + + https://github.com/owncloud/ocis/issues/551 + + * Bugfix #863: Fix dav api for trashbin + + The api was comparing the requested username to the userid. + + https://github.com/owncloud/ocis/issues/863 + + * Bugfix #204: Fix the ocs share with me response + + The path of the files shared with me was incorrect. + + https://github.com/owncloud/product/issues/204 + https://github.com/cs3org/reva/pull/1346 + + * Bugfix #1351: Fix xattr.Remove error check for macOS + + Previously, we checked the xattr.Remove error only for linux systems. Now macOS is checked + also + + https://github.com/cs3org/reva/pull/1351 + + * Bugfix #1320: Do not panic on remote.php/dav/files/ + + Currently requests to /remote.php/dav/files/ result in panics since we cannot longer strip + the user + destination from the url. This fixes the server response code and adds an error body to + the response. + + https://github.com/cs3org/reva/pull/1320 + + * Bugfix #1379: Make Jaeger agent usable + + Previously, you could not use tracing with jaeger agent because the tracing connector is + always used instead of the tracing endpoint. + + This PR removes the defaults for collector and tracing endpoint. + + https://github.com/cs3org/reva/pull/1379 + + * Bugfix #1331: Fix capabilities response for multiple client versions + + https://github.com/cs3org/reva/pull/1331 + + * Bugfix #1281: When sharing via ocs look up user by username + + The ocs api returns usernames when listing share recipients, so the lookup when creating the + share needs to search the usernames and not the userid. + + https://github.com/cs3org/reva/pull/1281 + + * Bugfix #1334: Handle removal of public shares by token or ID + + Previously different drivers handled removing public shares using different means, either + the token or the ID. Now, both the drivers support both these methods. + + https://github.com/cs3org/reva/pull/1334 + + * Change #990: Replace the user uuid with the username in ocs share responses + + The ocs api should not send the users uuid. Replaced the uuid with the username. + + https://github.com/owncloud/ocis/issues/990 + https://github.com/cs3org/reva/pull/1375 + + * Enhancement #1350: Add auth protocol based on user agent + + Previously, all available credential challenges are given to the client, for example, basic + auth, bearer token, etc ... Different clients have different priorities to use one method or + another, and before it was not possible to force a client to use one method without having a side + effect on other clients. + + This PR adds the functionality to target a specific auth protocol based on the user agent HTTP + header. + + https://github.com/cs3org/reva/pull/1350 + + * Enhancement #1362: Mark 'store-dev-release' CI step as failed on 4XX/5XX errors + + Prevent the errors while storing new 'daily' releases from going unnoticed on the CI. + + https://github.com/cs3org/reva/pull/1362 + + * Enhancement #1364: Remove expired Link on Get + + There is the scenario in which a public link has expired but ListPublicLink has not run, + accessing a technically expired public share is still possible. + + https://github.com/cs3org/reva/pull/1364 + + * Enhancement #1340: Add cache to store UID to UserID mapping in EOS + + Previously, we used to send an RPC to the user provider service for every lookup of user IDs from + the UID stored in EOS. This PR adds an in-memory lock-protected cache to store this mapping. + + https://github.com/cs3org/reva/pull/1340 + + * Enhancement #1154: Add support for the protobuf interface to eos metadata + + https://github.com/cs3org/reva/pull/1154 + + * Enhancement #1154: Merge-rebase from master 10/11/2020 + + https://github.com/cs3org/reva/pull/1154 + + * Enhancement #1359: Add cache for calculated etags for home and shares directory + + Since we store the references in the shares directory instead of actual resources, we need to + calculate the etag on every list/stat call. This is rather expensive so adding a cache would + help to a great extent with regard to the performance. + + https://github.com/cs3org/reva/pull/1359 + + * Enhancement #1321: Add support for multiple data transfer protocols + + Previously, we had to configure which data transfer protocol to use in the dataprovider + service. A previous PR added the functionality to redirect requests to different handlers + based on the request method but that would lead to conflicts if multiple protocols don't + support mutually exclusive sets of requests. This PR adds the functionality to have multiple + such handlers simultaneously and the client can choose which protocol to use. + + https://github.com/cs3org/reva/pull/1321 + https://github.com/cs3org/reva/pull/1285/ + + * Enhancement #1324: Log expected errors with debug level + + While trying to download a non existing file and reading a non existing attribute are + technically an error they are to be expected and nothing an admin can or even should act upon. + + https://github.com/cs3org/reva/pull/1324 + + * Enhancement #1351: Map errtypes to status + + When mapping errtypes to grpc statuses we now also map bad request and not implemented / + unsupported cases in the gateway storageprovider. + + https://github.com/cs3org/reva/pull/1351 + + * Enhancement #1347: Support property to enable health checking on a service + + This update introduces a new service property called `ENABLE_HEALTH_CHECKS` that must be + explicitly set to `true` if a service should be checked for its health status. This allows us to + only enable these checks for partner sites only, skipping vendor sites. + + https://github.com/cs3org/reva/pull/1347 + + * Enhancement #1332: Add import support to Mentix + + This update adds import support to Mentix, transforming it into a **Mesh Entity Exchanger**. + To properly support vendor site management, a new connector that works on a local file has been + added as well. + + https://github.com/cs3org/reva/pull/1332 + + * Enhancement #1371: Use self-hosted Drone CI + + Previously, we used the drone cloud to run the CI for the project. Due to unexpected and sudden + stop of the service for the cs3org we decided to self-host it. + + https://github.com/cs3org/reva/pull/1371 + + * Enhancement #1354: Map bad request and unimplement to http status codes + + We now return a 400 bad request when a grpc call fails with an invalid argument status and a 501 not + implemented when it fails with an unimplemented status. This prevents 500 errors when a user + tries to add resources to the Share folder or a storage does not implement an action. + + https://github.com/cs3org/reva/pull/1354 + + * Enhancement #929: Include share types in ocs propfind responses + + Added the share types to the ocs propfind response when a resource has been shared. + + https://github.com/owncloud/ocis/issues/929 + https://github.com/cs3org/reva/pull/1329 + + * Enhancement #1328: Add CLI commands for public shares + + https://github.com/cs3org/reva/pull/1328 + + * Enhancement #1388: Support range header in GET requests + + To allow resuming a download we now support GET requests with a range header. + + https://github.com/owncloud/ocis-reva/issues/12 + https://github.com/cs3org/reva/pull/1388 + + * Enhancement #1361: Remove expired Link on Access + + Since there is no background jobs scheduled to wipe out expired resources, for the time being + public links are going to be removed on a "on demand" basis, meaning whenever there is an API call + that access the list of shares for a given resource, we will check whether the share is expired + and delete it if so. + + https://github.com/cs3org/reva/pull/1361 + + * Enhancement #1386: Docker image for cs3org/revad:VERSION-eos + + Based on eos:c8_4.8.15 (Centos8, version 4.8.15). To be used when the Reva daemon needs IPC + with xrootd/eos via stdin/out. + + https://github.com/cs3org/reva/pull/1386 + https://github.com/cs3org/reva/pull/1389 + + * Enhancement #1368: Calculate and expose actual file permission set + + Instead of hardcoding the permissions set for every file and folder to ListContainer:true, + CreateContainer:true and always reporting the hardcoded string WCKDNVR for the WebDAV + permissions we now aggregate the actual cs3 resource permission set in the storage drivers and + correctly map them to ocs permissions and webdav permissions using a common role struct that + encapsulates the mapping logic. + + https://github.com/owncloud/ocis/issues/552 + https://github.com/owncloud/ocis/issues/762 + https://github.com/owncloud/ocis/issues/763 + https://github.com/owncloud/ocis/issues/893 + https://github.com/owncloud/ocis/issues/1126 + https://github.com/owncloud/ocis-reva/issues/47 + https://github.com/owncloud/ocis-reva/issues/315 + https://github.com/owncloud/ocis-reva/issues/316 + https://github.com/owncloud/product/issues/270 + https://github.com/cs3org/reva/pull/1368 + + Changelog for reva 1.4.0 (2020-11-17) ======================================= diff --git a/Dockerfile.reva b/Dockerfile.reva index c74edba6eb..83c228414d 100644 --- a/Dockerfile.reva +++ b/Dockerfile.reva @@ -1,9 +1,9 @@ -# Copyright 2018-2020 CERN +# Copyright 2018-2021 CERN # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software @@ -13,7 +13,7 @@ # limitations under the License. # # In applying this license, CERN does not waive the privileges and immunities -# granted to it by virtue of its status as an Intergovernmental Organization +# granted to it by virtue of its status as an Intergovernmental Organization # or submit itself to any jurisdiction. FROM golang:1.13 diff --git a/Dockerfile.revad b/Dockerfile.revad index 8d3a2e9ca8..0eafde6989 100644 --- a/Dockerfile.revad +++ b/Dockerfile.revad @@ -1,9 +1,9 @@ -# Copyright 2018-2020 CERN +# Copyright 2018-2021 CERN # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software @@ -13,7 +13,7 @@ # limitations under the License. # # In applying this license, CERN does not waive the privileges and immunities -# granted to it by virtue of its status as an Intergovernmental Organization +# granted to it by virtue of its status as an Intergovernmental Organization # or submit itself to any jurisdiction. FROM golang:1.13 diff --git a/RELEASE_DATE b/RELEASE_DATE index 9ba9437075..e0d49ce2fa 100644 --- a/RELEASE_DATE +++ b/RELEASE_DATE @@ -1 +1 @@ -2020-11-17 \ No newline at end of file +2021-01-12 \ No newline at end of file diff --git a/VERSION b/VERSION index e21e727f96..3e1ad720b1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.4.0 \ No newline at end of file +1.5.0 \ No newline at end of file diff --git a/changelog/unreleased/auth-by-user-agent.md b/changelog/1.5.0_2021-01-12/auth-by-user-agent.md similarity index 100% rename from changelog/unreleased/auth-by-user-agent.md rename to changelog/1.5.0_2021-01-12/auth-by-user-agent.md diff --git a/changelog/unreleased/changelog-fix.md b/changelog/1.5.0_2021-01-12/changelog-fix.md similarity index 100% rename from changelog/unreleased/changelog-fix.md rename to changelog/1.5.0_2021-01-12/changelog-fix.md diff --git a/changelog/unreleased/ci-fail-on-daily-upload.md b/changelog/1.5.0_2021-01-12/ci-fail-on-daily-upload.md similarity index 100% rename from changelog/unreleased/ci-fail-on-daily-upload.md rename to changelog/1.5.0_2021-01-12/ci-fail-on-daily-upload.md diff --git a/changelog/unreleased/delete-public-link-on-get-operations.md b/changelog/1.5.0_2021-01-12/delete-public-link-on-get-operations.md similarity index 100% rename from changelog/unreleased/delete-public-link-on-get-operations.md rename to changelog/1.5.0_2021-01-12/delete-public-link-on-get-operations.md diff --git a/changelog/unreleased/delete-sdk-tests.md b/changelog/1.5.0_2021-01-12/delete-sdk-tests.md similarity index 100% rename from changelog/unreleased/delete-sdk-tests.md rename to changelog/1.5.0_2021-01-12/delete-sdk-tests.md diff --git a/changelog/unreleased/eos-user-cache.md b/changelog/1.5.0_2021-01-12/eos-user-cache.md similarity index 100% rename from changelog/unreleased/eos-user-cache.md rename to changelog/1.5.0_2021-01-12/eos-user-cache.md diff --git a/changelog/unreleased/eosclientgrpc.md b/changelog/1.5.0_2021-01-12/eosclientgrpc.md similarity index 100% rename from changelog/unreleased/eosclientgrpc.md rename to changelog/1.5.0_2021-01-12/eosclientgrpc.md diff --git a/changelog/unreleased/fab-merge.md b/changelog/1.5.0_2021-01-12/fab-merge.md similarity index 100% rename from changelog/unreleased/fab-merge.md rename to changelog/1.5.0_2021-01-12/fab-merge.md diff --git a/changelog/unreleased/fix-files-home-redirect.md b/changelog/1.5.0_2021-01-12/fix-files-home-redirect.md similarity index 100% rename from changelog/unreleased/fix-files-home-redirect.md rename to changelog/1.5.0_2021-01-12/fix-files-home-redirect.md diff --git a/changelog/unreleased/fix-more-fd-leaks.md b/changelog/1.5.0_2021-01-12/fix-more-fd-leaks.md similarity index 100% rename from changelog/unreleased/fix-more-fd-leaks.md rename to changelog/1.5.0_2021-01-12/fix-more-fd-leaks.md diff --git a/changelog/unreleased/fix-ocis-move.md b/changelog/1.5.0_2021-01-12/fix-ocis-move.md similarity index 100% rename from changelog/unreleased/fix-ocis-move.md rename to changelog/1.5.0_2021-01-12/fix-ocis-move.md diff --git a/changelog/unreleased/fix-ocis-storage-purge.md b/changelog/1.5.0_2021-01-12/fix-ocis-storage-purge.md similarity index 100% rename from changelog/unreleased/fix-ocis-storage-purge.md rename to changelog/1.5.0_2021-01-12/fix-ocis-storage-purge.md diff --git a/changelog/unreleased/fix-ocis-trashbin.md b/changelog/1.5.0_2021-01-12/fix-ocis-trashbin.md similarity index 100% rename from changelog/unreleased/fix-ocis-trashbin.md rename to changelog/1.5.0_2021-01-12/fix-ocis-trashbin.md diff --git a/changelog/unreleased/fix-ocs-share-api.md b/changelog/1.5.0_2021-01-12/fix-ocs-share-api.md similarity index 100% rename from changelog/unreleased/fix-ocs-share-api.md rename to changelog/1.5.0_2021-01-12/fix-ocs-share-api.md diff --git a/changelog/unreleased/fix-xattr-error-darwin.md b/changelog/1.5.0_2021-01-12/fix-xattr-error-darwin.md similarity index 100% rename from changelog/unreleased/fix-xattr-error-darwin.md rename to changelog/1.5.0_2021-01-12/fix-xattr-error-darwin.md diff --git a/changelog/unreleased/gateway-etag-cache.md b/changelog/1.5.0_2021-01-12/gateway-etag-cache.md similarity index 100% rename from changelog/unreleased/gateway-etag-cache.md rename to changelog/1.5.0_2021-01-12/gateway-etag-cache.md diff --git a/changelog/unreleased/handle-invalid-webdav-listing.md b/changelog/1.5.0_2021-01-12/handle-invalid-webdav-listing.md similarity index 100% rename from changelog/unreleased/handle-invalid-webdav-listing.md rename to changelog/1.5.0_2021-01-12/handle-invalid-webdav-listing.md diff --git a/changelog/unreleased/http-datatx.md b/changelog/1.5.0_2021-01-12/http-datatx.md similarity index 100% rename from changelog/unreleased/http-datatx.md rename to changelog/1.5.0_2021-01-12/http-datatx.md diff --git a/changelog/unreleased/log-expected-errors-with-debug-level.md b/changelog/1.5.0_2021-01-12/log-expected-errors-with-debug-level.md similarity index 100% rename from changelog/unreleased/log-expected-errors-with-debug-level.md rename to changelog/1.5.0_2021-01-12/log-expected-errors-with-debug-level.md diff --git a/changelog/unreleased/make-jaeger-agent-usable.md b/changelog/1.5.0_2021-01-12/make-jaeger-agent-usable.md similarity index 100% rename from changelog/unreleased/make-jaeger-agent-usable.md rename to changelog/1.5.0_2021-01-12/make-jaeger-agent-usable.md diff --git a/changelog/unreleased/map-errtypes-to-status-and-back.md b/changelog/1.5.0_2021-01-12/map-errtypes-to-status-and-back.md similarity index 100% rename from changelog/unreleased/map-errtypes-to-status-and-back.md rename to changelog/1.5.0_2021-01-12/map-errtypes-to-status-and-back.md diff --git a/changelog/unreleased/mentix-checks.md b/changelog/1.5.0_2021-01-12/mentix-checks.md similarity index 100% rename from changelog/unreleased/mentix-checks.md rename to changelog/1.5.0_2021-01-12/mentix-checks.md diff --git a/changelog/unreleased/mentix-import.md b/changelog/1.5.0_2021-01-12/mentix-import.md similarity index 100% rename from changelog/unreleased/mentix-import.md rename to changelog/1.5.0_2021-01-12/mentix-import.md diff --git a/changelog/unreleased/new-drone-ci.md b/changelog/1.5.0_2021-01-12/new-drone-ci.md similarity index 100% rename from changelog/unreleased/new-drone-ci.md rename to changelog/1.5.0_2021-01-12/new-drone-ci.md diff --git a/changelog/unreleased/ocdav-handle-bad-request.md b/changelog/1.5.0_2021-01-12/ocdav-handle-bad-request.md similarity index 100% rename from changelog/unreleased/ocdav-handle-bad-request.md rename to changelog/1.5.0_2021-01-12/ocdav-handle-bad-request.md diff --git a/changelog/unreleased/ocis-ocs-share-types.md b/changelog/1.5.0_2021-01-12/ocis-ocs-share-types.md similarity index 100% rename from changelog/unreleased/ocis-ocs-share-types.md rename to changelog/1.5.0_2021-01-12/ocis-ocs-share-types.md diff --git a/changelog/unreleased/ocs-capabilities.md b/changelog/1.5.0_2021-01-12/ocs-capabilities.md similarity index 100% rename from changelog/unreleased/ocs-capabilities.md rename to changelog/1.5.0_2021-01-12/ocs-capabilities.md diff --git a/changelog/unreleased/ocs-lookup-user-by-username.md b/changelog/1.5.0_2021-01-12/ocs-lookup-user-by-username.md similarity index 100% rename from changelog/unreleased/ocs-lookup-user-by-username.md rename to changelog/1.5.0_2021-01-12/ocs-lookup-user-by-username.md diff --git a/changelog/unreleased/ocs-share-api-userid.md b/changelog/1.5.0_2021-01-12/ocs-share-api-userid.md similarity index 100% rename from changelog/unreleased/ocs-share-api-userid.md rename to changelog/1.5.0_2021-01-12/ocs-share-api-userid.md diff --git a/changelog/unreleased/public-shares-cli.md b/changelog/1.5.0_2021-01-12/public-shares-cli.md similarity index 100% rename from changelog/unreleased/public-shares-cli.md rename to changelog/1.5.0_2021-01-12/public-shares-cli.md diff --git a/changelog/unreleased/range-requests.md b/changelog/1.5.0_2021-01-12/range-requests.md similarity index 100% rename from changelog/unreleased/range-requests.md rename to changelog/1.5.0_2021-01-12/range-requests.md diff --git a/changelog/unreleased/remove-public-share-fix.md b/changelog/1.5.0_2021-01-12/remove-public-share-fix.md similarity index 100% rename from changelog/unreleased/remove-public-share-fix.md rename to changelog/1.5.0_2021-01-12/remove-public-share-fix.md diff --git a/changelog/unreleased/remove-public-shares-on-list.md b/changelog/1.5.0_2021-01-12/remove-public-shares-on-list.md similarity index 100% rename from changelog/unreleased/remove-public-shares-on-list.md rename to changelog/1.5.0_2021-01-12/remove-public-shares-on-list.md diff --git a/changelog/unreleased/revad-eos-docker-image.md b/changelog/1.5.0_2021-01-12/revad-eos-docker-image.md similarity index 100% rename from changelog/unreleased/revad-eos-docker-image.md rename to changelog/1.5.0_2021-01-12/revad-eos-docker-image.md diff --git a/changelog/unreleased/share-permissions-and-resource-permissions.md b/changelog/1.5.0_2021-01-12/share-permissions-and-resource-permissions.md similarity index 100% rename from changelog/unreleased/share-permissions-and-resource-permissions.md rename to changelog/1.5.0_2021-01-12/share-permissions-and-resource-permissions.md diff --git a/changelog/NOTE.md b/changelog/NOTE.md index 19d09b7e49..d18ff1f7df 100644 --- a/changelog/NOTE.md +++ b/changelog/NOTE.md @@ -1,198 +1,306 @@ -Changelog for reva 1.4.0 (2020-11-17) +Changelog for reva 1.5.0 (2021-01-12) ======================================= -The following sections list the changes in reva 1.4.0 relevant to +The following sections list the changes in reva 1.5.0 relevant to reva users. The changes are ordered by importance. Summary ------- - * Fix #1316: Fix listing shares for nonexisting path - * Fix #1274: Let the gateway filter invalid references - * Fix #1269: Handle more eos errors - * Fix #1297: Check the err and the response status code - * Fix #1260: Fix file descriptor leak on ocdav put handler - * Fix #1253: Upload file to storage provider after assembling chunks - * Fix #1264: Fix etag propagation in ocis driver - * Fix #1255: Check current node when iterating over path segments - * Fix #1265: Stop setting propagation xattr on new files - * Fix #260: Filter share with me requests - * Fix #1317: Prevent nil pointer when listing shares - * Fix #1259: Fix propfind response code on forbidden files - * Fix #1294: Fix error type in read node when file was not found - * Fix #1258: Update share grants on share update - * Enh #1257: Add a test user to all sites - * Enh #1234: Resolve a WOPI bridge appProviderURL by extracting its redirect - * Enh #1239: Add logic for finding groups to user provider service - * Enh #1280: Add a Reva SDK - * Enh #1237: Setup of grpc transfer service and cli - * Enh #1224: Add SQL driver for share manager - * Enh #1285: Refactor the uploading files workflow from various clients - * Enh #1233: Add support for custom CodiMD mimetype + * Fix #1385: Run changelog check only if there are changes in the code + * Fix #1333: Delete sdk unit tests + * Fix #1342: Dav endpoint routing to home storage when request is remote.php/dav/files + * Fix #1338: Fix fd leaks + * Fix #1343: Fix ocis move + * Fix #551: Fix purging deleted files with the ocis storage + * Fix #863: Fix dav api for trashbin + * Fix #204: Fix the ocs share with me response + * Fix #1351: Fix xattr.Remove error check for macOS + * Fix #1320: Do not panic on remote.php/dav/files/ + * Fix #1379: Make Jaeger agent usable + * Fix #1331: Fix capabilities response for multiple client versions + * Fix #1281: When sharing via ocs look up user by username + * Fix #1334: Handle removal of public shares by token or ID + * Chg #990: Replace the user uuid with the username in ocs share responses + * Enh #1350: Add auth protocol based on user agent + * Enh #1362: Mark 'store-dev-release' CI step as failed on 4XX/5XX errors + * Enh #1364: Remove expired Link on Get + * Enh #1340: Add cache to store UID to UserID mapping in EOS + * Enh #1154: Add support for the protobuf interface to eos metadata + * Enh #1154: Merge-rebase from master 10/11/2020 + * Enh #1359: Add cache for calculated etags for home and shares directory + * Enh #1321: Add support for multiple data transfer protocols + * Enh #1324: Log expected errors with debug level + * Enh #1351: Map errtypes to status + * Enh #1347: Support property to enable health checking on a service + * Enh #1332: Add import support to Mentix + * Enh #1371: Use self-hosted Drone CI + * Enh #1354: Map bad request and unimplement to http status codes + * Enh #929: Include share types in ocs propfind responses + * Enh #1328: Add CLI commands for public shares + * Enh #1388: Support range header in GET requests + * Enh #1361: Remove expired Link on Access + * Enh #1386: Docker image for cs3org/revad:VERSION-eos + * Enh #1368: Calculate and expose actual file permission set Details ------- - * Bugfix #1316: Fix listing shares for nonexisting path + * Bugfix #1385: Run changelog check only if there are changes in the code - When trying to list shares for a not existing file or folder the ocs sharing implementation no - longer responds with the wrong status code and broken xml. + https://github.com/cs3org/reva/pull/1385 - https://github.com/cs3org/reva/pull/1316 + * Bugfix #1333: Delete sdk unit tests - * Bugfix #1274: Let the gateway filter invalid references + These depend on a remote server running reva and thus fail in case of version mismatches. - We now filter deleted and unshared entries from the response when listing the shares folder of a - user. + https://github.com/cs3org/reva/pull/1333 - https://github.com/cs3org/reva/pull/1274 + * Bugfix #1342: Dav endpoint routing to home storage when request is remote.php/dav/files - * Bugfix #1269: Handle more eos errors + There was a regression in which we were not routing correctly to the right storage depending on + the url. - We now treat E2BIG, EACCES as a permission error, which occur, eg. when acl checks fail and - return a permission denied error. + https://github.com/cs3org/reva/pull/1342 - https://github.com/cs3org/reva/pull/1269 + * Bugfix #1338: Fix fd leaks - * Bugfix #1297: Check the err and the response status code + There were some left over open file descriptors on simple.go. - The publicfile handler needs to check the response status code to return proper not pound and - permission errors in the webdav api. + https://github.com/cs3org/reva/pull/1338 - https://github.com/cs3org/reva/pull/1297 + * Bugfix #1343: Fix ocis move - * Bugfix #1260: Fix file descriptor leak on ocdav put handler + Use the old node id to build the target path for xattr updates. - File descriptors on the ocdav service, especially on the put handler was leaking http - connections. This PR addresses this. + https://github.com/owncloud/ocis/issues/975 + https://github.com/cs3org/reva/pull/1343 - https://github.com/cs3org/reva/pull/1260 + * Bugfix #551: Fix purging deleted files with the ocis storage - * Bugfix #1253: Upload file to storage provider after assembling chunks + The ocis storage could load the owner information of a deleted file. This caused the storage to + not be able to purge deleted files. - In the PUT handler for chunked uploads in ocdav, we store the individual chunks in temporary - file but do not write the assembled file to storage. This PR fixes that. + https://github.com/owncloud/ocis/issues/551 - https://github.com/cs3org/reva/pull/1253 + * Bugfix #863: Fix dav api for trashbin - * Bugfix #1264: Fix etag propagation in ocis driver + The api was comparing the requested username to the userid. - We now use a new synctime timestamp instead of trying to read the mtime to avoid race conditions - when the stat request happens too quickly. + https://github.com/owncloud/ocis/issues/863 - https://github.com/owncloud/product/issues/249 - https://github.com/cs3org/reva/pull/1264 + * Bugfix #204: Fix the ocs share with me response - * Bugfix #1255: Check current node when iterating over path segments + The path of the files shared with me was incorrect. - When checking permissions we were always checking the leaf instead of using the current node - while iterating over path segments. + https://github.com/owncloud/product/issues/204 + https://github.com/cs3org/reva/pull/1346 - https://github.com/cs3org/reva/pull/1255 + * Bugfix #1351: Fix xattr.Remove error check for macOS - * Bugfix #1265: Stop setting propagation xattr on new files + Previously, we checked the xattr.Remove error only for linux systems. Now macOS is checked + also - We no longer set the propagation flag on a file because it is only evaluated for folders anyway. + https://github.com/cs3org/reva/pull/1351 - https://github.com/cs3org/reva/pull/1265 + * Bugfix #1320: Do not panic on remote.php/dav/files/ - * Bugfix #260: Filter share with me requests + Currently requests to /remote.php/dav/files/ result in panics since we cannot longer strip + the user + destination from the url. This fixes the server response code and adds an error body to + the response. - The OCS API now properly filters share with me requests by path and by share status (pending, - accepted, rejected, all) + https://github.com/cs3org/reva/pull/1320 - https://github.com/owncloud/ocis-reva/issues/260 - https://github.com/owncloud/ocis-reva/issues/311 - https://github.com/cs3org/reva/pull/1301 + * Bugfix #1379: Make Jaeger agent usable - * Bugfix #1317: Prevent nil pointer when listing shares + Previously, you could not use tracing with jaeger agent because the tracing connector is + always used instead of the tracing endpoint. - We now handle cases where the grpc connection failed correctly by no longer trying to access the - response status. + This PR removes the defaults for collector and tracing endpoint. - https://github.com/cs3org/reva/pull/1317 + https://github.com/cs3org/reva/pull/1379 - * Bugfix #1259: Fix propfind response code on forbidden files + * Bugfix #1331: Fix capabilities response for multiple client versions - When executing a propfind to a resource owned by another user the service would respond with a - HTTP 403. In ownCloud 10 the response was HTTP 207. This change sets the response code to HTTP 207 - to stay backwards compatible. + https://github.com/cs3org/reva/pull/1331 - https://github.com/cs3org/reva/pull/1259 + * Bugfix #1281: When sharing via ocs look up user by username - * Bugfix #1294: Fix error type in read node when file was not found + The ocs api returns usernames when listing share recipients, so the lookup when creating the + share needs to search the usernames and not the userid. - The method ReadNode in the ocis storage didn't return the error type NotFound when a file was not - found. + https://github.com/cs3org/reva/pull/1281 - https://github.com/cs3org/reva/pull/1294 + * Bugfix #1334: Handle removal of public shares by token or ID - * Bugfix #1258: Update share grants on share update + Previously different drivers handled removing public shares using different means, either + the token or the ID. Now, both the drivers support both these methods. - When a share was updated the share information in the share manager was updated but the grants - set by the storage provider were not. + https://github.com/cs3org/reva/pull/1334 - https://github.com/cs3org/reva/pull/1258 + * Change #990: Replace the user uuid with the username in ocs share responses - * Enhancement #1257: Add a test user to all sites + The ocs api should not send the users uuid. Replaced the uuid with the username. - For health monitoring of all mesh sites, we need a special user account that is present on every - site. This PR adds such a user to each users-*.json file so that every site will have the same test - user credentials. + https://github.com/owncloud/ocis/issues/990 + https://github.com/cs3org/reva/pull/1375 - https://github.com/cs3org/reva/pull/1257 + * Enhancement #1350: Add auth protocol based on user agent - * Enhancement #1234: Resolve a WOPI bridge appProviderURL by extracting its redirect + Previously, all available credential challenges are given to the client, for example, basic + auth, bearer token, etc ... Different clients have different priorities to use one method or + another, and before it was not possible to force a client to use one method without having a side + effect on other clients. - Applications served by the WOPI bridge (CodiMD for the time being) require an extra - redirection as the WOPI bridge itself behaves like a user app. This change returns to the client - the redirected URL from the WOPI bridge, which is the real application URL. + This PR adds the functionality to target a specific auth protocol based on the user agent HTTP + header. - https://github.com/cs3org/reva/pull/1234 + https://github.com/cs3org/reva/pull/1350 - * Enhancement #1239: Add logic for finding groups to user provider service + * Enhancement #1362: Mark 'store-dev-release' CI step as failed on 4XX/5XX errors - To create shares with user groups, the functionality for searching for these based on a pattern - is needed. This PR adds that. + Prevent the errors while storing new 'daily' releases from going unnoticed on the CI. - https://github.com/cs3org/reva/pull/1239 + https://github.com/cs3org/reva/pull/1362 - * Enhancement #1280: Add a Reva SDK + * Enhancement #1364: Remove expired Link on Get - A Reva SDK has been added to make working with a remote Reva instance much easier by offering a - high-level API that hides all the underlying details of the CS3API. + There is the scenario in which a public link has expired but ListPublicLink has not run, + accessing a technically expired public share is still possible. - https://github.com/cs3org/reva/pull/1280 + https://github.com/cs3org/reva/pull/1364 - * Enhancement #1237: Setup of grpc transfer service and cli + * Enhancement #1340: Add cache to store UID to UserID mapping in EOS - The grpc transfer service and cli for it. + Previously, we used to send an RPC to the user provider service for every lookup of user IDs from + the UID stored in EOS. This PR adds an in-memory lock-protected cache to store this mapping. - https://github.com/cs3org/reva/pull/1237 + https://github.com/cs3org/reva/pull/1340 - * Enhancement #1224: Add SQL driver for share manager + * Enhancement #1154: Add support for the protobuf interface to eos metadata - This PR adds an SQL driver for the shares manager which expects a schema equivalent to the one - used in production for CERNBox. + https://github.com/cs3org/reva/pull/1154 - https://github.com/cs3org/reva/pull/1224 + * Enhancement #1154: Merge-rebase from master 10/11/2020 - * Enhancement #1285: Refactor the uploading files workflow from various clients + https://github.com/cs3org/reva/pull/1154 - Previously, we were implementing the tus client logic in the ocdav service, leading to - restricting the whole of tus logic to the internal services. This PR refactors that workflow to - accept incoming requests following the tus protocol while using simpler transmission - internally. + * Enhancement #1359: Add cache for calculated etags for home and shares directory - https://github.com/cs3org/reva/pull/1285 - https://github.com/cs3org/reva/pull/1314 + Since we store the references in the shares directory instead of actual resources, we need to + calculate the etag on every list/stat call. This is rather expensive so adding a cache would + help to a great extent with regard to the performance. - * Enhancement #1233: Add support for custom CodiMD mimetype + https://github.com/cs3org/reva/pull/1359 - The new mimetype is associated with the `.zmd` file extension. The corresponding - configuration is associated with the storageprovider. + * Enhancement #1321: Add support for multiple data transfer protocols - https://github.com/cs3org/reva/pull/1233 - https://github.com/cs3org/reva/pull/1284 + Previously, we had to configure which data transfer protocol to use in the dataprovider + service. A previous PR added the functionality to redirect requests to different handlers + based on the request method but that would lead to conflicts if multiple protocols don't + support mutually exclusive sets of requests. This PR adds the functionality to have multiple + such handlers simultaneously and the client can choose which protocol to use. + + https://github.com/cs3org/reva/pull/1321 + https://github.com/cs3org/reva/pull/1285/ + + * Enhancement #1324: Log expected errors with debug level + + While trying to download a non existing file and reading a non existing attribute are + technically an error they are to be expected and nothing an admin can or even should act upon. + + https://github.com/cs3org/reva/pull/1324 + + * Enhancement #1351: Map errtypes to status + + When mapping errtypes to grpc statuses we now also map bad request and not implemented / + unsupported cases in the gateway storageprovider. + + https://github.com/cs3org/reva/pull/1351 + + * Enhancement #1347: Support property to enable health checking on a service + + This update introduces a new service property called `ENABLE_HEALTH_CHECKS` that must be + explicitly set to `true` if a service should be checked for its health status. This allows us to + only enable these checks for partner sites only, skipping vendor sites. + + https://github.com/cs3org/reva/pull/1347 + + * Enhancement #1332: Add import support to Mentix + + This update adds import support to Mentix, transforming it into a **Mesh Entity Exchanger**. + To properly support vendor site management, a new connector that works on a local file has been + added as well. + + https://github.com/cs3org/reva/pull/1332 + + * Enhancement #1371: Use self-hosted Drone CI + + Previously, we used the drone cloud to run the CI for the project. Due to unexpected and sudden + stop of the service for the cs3org we decided to self-host it. + + https://github.com/cs3org/reva/pull/1371 + + * Enhancement #1354: Map bad request and unimplement to http status codes + + We now return a 400 bad request when a grpc call fails with an invalid argument status and a 501 not + implemented when it fails with an unimplemented status. This prevents 500 errors when a user + tries to add resources to the Share folder or a storage does not implement an action. + + https://github.com/cs3org/reva/pull/1354 + + * Enhancement #929: Include share types in ocs propfind responses + + Added the share types to the ocs propfind response when a resource has been shared. + + https://github.com/owncloud/ocis/issues/929 + https://github.com/cs3org/reva/pull/1329 + + * Enhancement #1328: Add CLI commands for public shares + + https://github.com/cs3org/reva/pull/1328 + + * Enhancement #1388: Support range header in GET requests + + To allow resuming a download we now support GET requests with a range header. + + https://github.com/owncloud/ocis-reva/issues/12 + https://github.com/cs3org/reva/pull/1388 + + * Enhancement #1361: Remove expired Link on Access + + Since there is no background jobs scheduled to wipe out expired resources, for the time being + public links are going to be removed on a "on demand" basis, meaning whenever there is an API call + that access the list of shares for a given resource, we will check whether the share is expired + and delete it if so. + + https://github.com/cs3org/reva/pull/1361 + + * Enhancement #1386: Docker image for cs3org/revad:VERSION-eos + + Based on eos:c8_4.8.15 (Centos8, version 4.8.15). To be used when the Reva daemon needs IPC + with xrootd/eos via stdin/out. + + https://github.com/cs3org/reva/pull/1386 + https://github.com/cs3org/reva/pull/1389 + + * Enhancement #1368: Calculate and expose actual file permission set + + Instead of hardcoding the permissions set for every file and folder to ListContainer:true, + CreateContainer:true and always reporting the hardcoded string WCKDNVR for the WebDAV + permissions we now aggregate the actual cs3 resource permission set in the storage drivers and + correctly map them to ocs permissions and webdav permissions using a common role struct that + encapsulates the mapping logic. + + https://github.com/owncloud/ocis/issues/552 + https://github.com/owncloud/ocis/issues/762 + https://github.com/owncloud/ocis/issues/763 + https://github.com/owncloud/ocis/issues/893 + https://github.com/owncloud/ocis/issues/1126 + https://github.com/owncloud/ocis-reva/issues/47 + https://github.com/owncloud/ocis-reva/issues/315 + https://github.com/owncloud/ocis-reva/issues/316 + https://github.com/owncloud/product/issues/270 + https://github.com/cs3org/reva/pull/1368 diff --git a/changelog/unreleased/copyright-2021.md b/changelog/unreleased/copyright-2021.md new file mode 100644 index 0000000000..c6b1353e5d --- /dev/null +++ b/changelog/unreleased/copyright-2021.md @@ -0,0 +1,3 @@ +Enhancement: Bump the Copyright date to 2021 + +https://github.com/cs3org/reva/pull/1397 diff --git a/changelog/unreleased/fix-dav-namespace.md b/changelog/unreleased/fix-dav-namespace.md new file mode 100644 index 0000000000..e2d565529a --- /dev/null +++ b/changelog/unreleased/fix-dav-namespace.md @@ -0,0 +1,16 @@ +Bugfix: Use the user in request for deciding the layout for non-home DAV requests + +For the incoming /dav/files/userID requests, we have different namespaces +depending on whether the request is for the logged-in user's namespace or not. +Since in the storage drivers, we specify the layout depending only on the user +whose resources are to be accessed, this fails when a user wants to access +another user's namespace when the storage provider depends on the logged in +user's namespace. This PR fixes that. + +For example, consider the following case. The owncloud fs uses a layout +{{substr 0 1 .Id.OpaqueId}}/{{.Id.OpaqueId}}. The user einstein sends a request +to access a resource shared with him, say /dav/files/marie/abcd, which should be +allowed. However, based on the way we applied the layout, there's no way in +which this can be translated to /m/marie/. + +https://github.com/cs3org/reva/pull/1401 diff --git a/changelog/unreleased/ocis-favorites-etags-mtime-metadata.md b/changelog/unreleased/ocis-favorites-etags-mtime-metadata.md new file mode 100644 index 0000000000..004175a62c --- /dev/null +++ b/changelog/unreleased/ocis-favorites-etags-mtime-metadata.md @@ -0,0 +1,7 @@ +Enhancement: allow setting favorites, mtime and a temporary etag + +We now let the ocis driver persist favorites, set temporary etags and the mtime as arbitrary metadata. + +https://github.com/cs3org/reva/pull/1393 +https://github.com/owncloud/ocis/issues/567 +https://github.com/cs3org/reva/issues/1394 diff --git a/changelog/unreleased/xcloud-metrics.md b/changelog/unreleased/xcloud-metrics.md new file mode 100644 index 0000000000..165881677b --- /dev/null +++ b/changelog/unreleased/xcloud-metrics.md @@ -0,0 +1,7 @@ +Enhancement: support remote cloud gathering metrics + +The current metrics package can only gather metrics either from +json files. With this feature, the metrics can be gathered polling +the http endpoints exposed by the owncloud/nextcloud sciencemesh apps. + +https://github.com/cs3org/reva/pull/1403 diff --git a/cmd/reva/arguments.go b/cmd/reva/arguments.go index 0d6a7cb3bf..b618a159b5 100644 --- a/cmd/reva/arguments.go +++ b/cmd/reva/arguments.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/command.go b/cmd/reva/command.go index be791dddcb..9757704b17 100644 --- a/cmd/reva/command.go +++ b/cmd/reva/command.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/common.go b/cmd/reva/common.go index 3a8d53c782..7637df077a 100644 --- a/cmd/reva/common.go +++ b/cmd/reva/common.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/completer.go b/cmd/reva/completer.go index 22aa591315..88fa169492 100644 --- a/cmd/reva/completer.go +++ b/cmd/reva/completer.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/configure.go b/cmd/reva/configure.go index 0795a84daa..5e6d042e30 100644 --- a/cmd/reva/configure.go +++ b/cmd/reva/configure.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/download.go b/cmd/reva/download.go index 4c0c6f0f58..53b38a098b 100644 --- a/cmd/reva/download.go +++ b/cmd/reva/download.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/executor.go b/cmd/reva/executor.go index 80a13652ac..07150735db 100644 --- a/cmd/reva/executor.go +++ b/cmd/reva/executor.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/gen-config.go b/cmd/reva/gen-config.go index d4ec05046d..a0ba669cfb 100644 --- a/cmd/reva/gen-config.go +++ b/cmd/reva/gen-config.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/gen-users.go b/cmd/reva/gen-users.go index c222da2e74..74d2cd4a20 100644 --- a/cmd/reva/gen-users.go +++ b/cmd/reva/gen-users.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/gen.go b/cmd/reva/gen.go index 06b031b29e..e0acc89859 100644 --- a/cmd/reva/gen.go +++ b/cmd/reva/gen.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/gen/gen.go b/cmd/reva/gen/gen.go index 7bfa8c1b38..660456dc6a 100644 --- a/cmd/reva/gen/gen.go +++ b/cmd/reva/gen/gen.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/grpc.go b/cmd/reva/grpc.go index 00591f3b33..3f0b24c8d2 100644 --- a/cmd/reva/grpc.go +++ b/cmd/reva/grpc.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/help.go b/cmd/reva/help.go index 20638f7b48..fdc51430ea 100644 --- a/cmd/reva/help.go +++ b/cmd/reva/help.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/import.go b/cmd/reva/import.go index 34ba778356..649c4bd211 100644 --- a/cmd/reva/import.go +++ b/cmd/reva/import.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/login.go b/cmd/reva/login.go index 957df0cdce..afde835094 100644 --- a/cmd/reva/login.go +++ b/cmd/reva/login.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/ls.go b/cmd/reva/ls.go index 21ef7b2992..fa93fd9517 100644 --- a/cmd/reva/ls.go +++ b/cmd/reva/ls.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/main.go b/cmd/reva/main.go index 6e5a1135d3..5f851cc490 100644 --- a/cmd/reva/main.go +++ b/cmd/reva/main.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/mkdir.go b/cmd/reva/mkdir.go index 3da5f4fab7..d98b474319 100644 --- a/cmd/reva/mkdir.go +++ b/cmd/reva/mkdir.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/mv.go b/cmd/reva/mv.go index 4a1a73eedf..bacb13aeb6 100644 --- a/cmd/reva/mv.go +++ b/cmd/reva/mv.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/ocm-share-create.go b/cmd/reva/ocm-share-create.go index d12cb2a246..a7783ccfab 100644 --- a/cmd/reva/ocm-share-create.go +++ b/cmd/reva/ocm-share-create.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/ocm-share-list-received.go b/cmd/reva/ocm-share-list-received.go index 9d7603d7a5..9128e5b734 100644 --- a/cmd/reva/ocm-share-list-received.go +++ b/cmd/reva/ocm-share-list-received.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/ocm-share-list.go b/cmd/reva/ocm-share-list.go index 981de7ef34..7f878a2631 100644 --- a/cmd/reva/ocm-share-list.go +++ b/cmd/reva/ocm-share-list.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/ocm-share-remove.go b/cmd/reva/ocm-share-remove.go index d6b77db370..8332c77407 100644 --- a/cmd/reva/ocm-share-remove.go +++ b/cmd/reva/ocm-share-remove.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/ocm-share-update-received.go b/cmd/reva/ocm-share-update-received.go index e4051a48b2..40b2f7999e 100644 --- a/cmd/reva/ocm-share-update-received.go +++ b/cmd/reva/ocm-share-update-received.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/ocm-share-update.go b/cmd/reva/ocm-share-update.go index 1202acbedf..e77389f411 100644 --- a/cmd/reva/ocm-share-update.go +++ b/cmd/reva/ocm-share-update.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/open-file-in-app-provider.go b/cmd/reva/open-file-in-app-provider.go index 9c23f53e7e..c4514a0fd4 100644 --- a/cmd/reva/open-file-in-app-provider.go +++ b/cmd/reva/open-file-in-app-provider.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/preferences.go b/cmd/reva/preferences.go index a7dde55250..8a5f86e0a7 100644 --- a/cmd/reva/preferences.go +++ b/cmd/reva/preferences.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/public-share-create.go b/cmd/reva/public-share-create.go index 99a2586576..b50af172a5 100644 --- a/cmd/reva/public-share-create.go +++ b/cmd/reva/public-share-create.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/public-share-list.go b/cmd/reva/public-share-list.go index 318aa7b6ff..b8dbf322ce 100644 --- a/cmd/reva/public-share-list.go +++ b/cmd/reva/public-share-list.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/public-share-remove.go b/cmd/reva/public-share-remove.go index 472135a142..73ffc374fe 100644 --- a/cmd/reva/public-share-remove.go +++ b/cmd/reva/public-share-remove.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/public-share-update.go b/cmd/reva/public-share-update.go index 5926e5fea3..1e55cb46bc 100644 --- a/cmd/reva/public-share-update.go +++ b/cmd/reva/public-share-update.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/recycle-list.go b/cmd/reva/recycle-list.go index e755ebb586..649ae48dc2 100644 --- a/cmd/reva/recycle-list.go +++ b/cmd/reva/recycle-list.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/recycle-purge.go b/cmd/reva/recycle-purge.go index 17833a37b0..d33e43553f 100644 --- a/cmd/reva/recycle-purge.go +++ b/cmd/reva/recycle-purge.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/recycle-restore.go b/cmd/reva/recycle-restore.go index 7482d31131..5915b21387 100644 --- a/cmd/reva/recycle-restore.go +++ b/cmd/reva/recycle-restore.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/rm.go b/cmd/reva/rm.go index 7799de87d9..b596e745d0 100644 --- a/cmd/reva/rm.go +++ b/cmd/reva/rm.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/share-create.go b/cmd/reva/share-create.go index 5d32392652..5da1d2c37c 100644 --- a/cmd/reva/share-create.go +++ b/cmd/reva/share-create.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/share-list-received.go b/cmd/reva/share-list-received.go index d988ab6f07..450ab979ee 100644 --- a/cmd/reva/share-list-received.go +++ b/cmd/reva/share-list-received.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/share-list.go b/cmd/reva/share-list.go index 641135b719..eedf4e74e6 100644 --- a/cmd/reva/share-list.go +++ b/cmd/reva/share-list.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/share-remove.go b/cmd/reva/share-remove.go index add8d98adf..ae24282230 100644 --- a/cmd/reva/share-remove.go +++ b/cmd/reva/share-remove.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/share-update-received.go b/cmd/reva/share-update-received.go index 10b32ad779..7dd974efb7 100644 --- a/cmd/reva/share-update-received.go +++ b/cmd/reva/share-update-received.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/share-update.go b/cmd/reva/share-update.go index 6887d92848..00603cd994 100644 --- a/cmd/reva/share-update.go +++ b/cmd/reva/share-update.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/stat.go b/cmd/reva/stat.go index 052c7175e9..29147038cd 100644 --- a/cmd/reva/stat.go +++ b/cmd/reva/stat.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/transfer-cancel.go b/cmd/reva/transfer-cancel.go index b8bfbcb97c..aafcce950c 100644 --- a/cmd/reva/transfer-cancel.go +++ b/cmd/reva/transfer-cancel.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/transfer-create.go b/cmd/reva/transfer-create.go index 5e2412a0b8..e77ba8df45 100644 --- a/cmd/reva/transfer-create.go +++ b/cmd/reva/transfer-create.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/transfer-get-status.go b/cmd/reva/transfer-get-status.go index 3a6bc56d1e..bef584c913 100644 --- a/cmd/reva/transfer-get-status.go +++ b/cmd/reva/transfer-get-status.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/upload.go b/cmd/reva/upload.go index 63c1968332..9bf2ea0070 100644 --- a/cmd/reva/upload.go +++ b/cmd/reva/upload.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/version.go b/cmd/reva/version.go index f85c873096..ad8d725088 100644 --- a/cmd/reva/version.go +++ b/cmd/reva/version.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/reva/whoami.go b/cmd/reva/whoami.go index e52bb08d31..acd2c4c526 100644 --- a/cmd/reva/whoami.go +++ b/cmd/reva/whoami.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/revad/internal/config/config.go b/cmd/revad/internal/config/config.go index 5667fa17c0..99eda406d8 100644 --- a/cmd/revad/internal/config/config.go +++ b/cmd/revad/internal/config/config.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/revad/internal/grace/grace.go b/cmd/revad/internal/grace/grace.go index 531a3fda0c..bd90e6bdc7 100644 --- a/cmd/revad/internal/grace/grace.go +++ b/cmd/revad/internal/grace/grace.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/revad/main.go b/cmd/revad/main.go index ac6eddae7e..be3addcbe6 100644 --- a/cmd/revad/main.go +++ b/cmd/revad/main.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/revad/runtime/loader.go b/cmd/revad/runtime/loader.go index eab2d41111..4e75f98bca 100644 --- a/cmd/revad/runtime/loader.go +++ b/cmd/revad/runtime/loader.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/revad/runtime/option.go b/cmd/revad/runtime/option.go index e747b418be..3e1dee98f8 100644 --- a/cmd/revad/runtime/option.go +++ b/cmd/revad/runtime/option.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cmd/revad/runtime/runtime.go b/cmd/revad/runtime/runtime.go index 5d2a934bee..cd5b7f7c74 100644 --- a/cmd/revad/runtime/runtime.go +++ b/cmd/revad/runtime/runtime.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/docs/content/en/docs/changelog/1.5.0/_index.md b/docs/content/en/docs/changelog/1.5.0/_index.md new file mode 100644 index 0000000000..1460283b36 --- /dev/null +++ b/docs/content/en/docs/changelog/1.5.0/_index.md @@ -0,0 +1,315 @@ + +--- +title: "v1.5.0" +linkTitle: "v1.5.0" +weight: 40 +description: > + Changelog for Reva v1.5.0 (2021-01-12) +--- + +Changelog for reva 1.5.0 (2021-01-12) +======================================= + +The following sections list the changes in reva 1.5.0 relevant to +reva users. The changes are ordered by importance. + +Summary +------- + + * Fix #1385: Run changelog check only if there are changes in the code + * Fix #1333: Delete sdk unit tests + * Fix #1342: Dav endpoint routing to home storage when request is remote.php/dav/files + * Fix #1338: Fix fd leaks + * Fix #1343: Fix ocis move + * Fix #551: Fix purging deleted files with the ocis storage + * Fix #863: Fix dav api for trashbin + * Fix #204: Fix the ocs share with me response + * Fix #1351: Fix xattr.Remove error check for macOS + * Fix #1320: Do not panic on remote.php/dav/files/ + * Fix #1379: Make Jaeger agent usable + * Fix #1331: Fix capabilities response for multiple client versions + * Fix #1281: When sharing via ocs look up user by username + * Fix #1334: Handle removal of public shares by token or ID + * Chg #990: Replace the user uuid with the username in ocs share responses + * Enh #1350: Add auth protocol based on user agent + * Enh #1362: Mark 'store-dev-release' CI step as failed on 4XX/5XX errors + * Enh #1364: Remove expired Link on Get + * Enh #1340: Add cache to store UID to UserID mapping in EOS + * Enh #1154: Add support for the protobuf interface to eos metadata + * Enh #1154: Merge-rebase from master 10/11/2020 + * Enh #1359: Add cache for calculated etags for home and shares directory + * Enh #1321: Add support for multiple data transfer protocols + * Enh #1324: Log expected errors with debug level + * Enh #1351: Map errtypes to status + * Enh #1347: Support property to enable health checking on a service + * Enh #1332: Add import support to Mentix + * Enh #1371: Use self-hosted Drone CI + * Enh #1354: Map bad request and unimplement to http status codes + * Enh #929: Include share types in ocs propfind responses + * Enh #1328: Add CLI commands for public shares + * Enh #1388: Support range header in GET requests + * Enh #1361: Remove expired Link on Access + * Enh #1386: Docker image for cs3org/revad:VERSION-eos + * Enh #1368: Calculate and expose actual file permission set + +Details +------- + + * Bugfix #1385: Run changelog check only if there are changes in the code + + https://github.com/cs3org/reva/pull/1385 + + * Bugfix #1333: Delete sdk unit tests + + These depend on a remote server running reva and thus fail in case of version mismatches. + + https://github.com/cs3org/reva/pull/1333 + + * Bugfix #1342: Dav endpoint routing to home storage when request is remote.php/dav/files + + There was a regression in which we were not routing correctly to the right storage depending on + the url. + + https://github.com/cs3org/reva/pull/1342 + + * Bugfix #1338: Fix fd leaks + + There were some left over open file descriptors on simple.go. + + https://github.com/cs3org/reva/pull/1338 + + * Bugfix #1343: Fix ocis move + + Use the old node id to build the target path for xattr updates. + + https://github.com/owncloud/ocis/issues/975 + https://github.com/cs3org/reva/pull/1343 + + * Bugfix #551: Fix purging deleted files with the ocis storage + + The ocis storage could load the owner information of a deleted file. This caused the storage to + not be able to purge deleted files. + + https://github.com/owncloud/ocis/issues/551 + + * Bugfix #863: Fix dav api for trashbin + + The api was comparing the requested username to the userid. + + https://github.com/owncloud/ocis/issues/863 + + * Bugfix #204: Fix the ocs share with me response + + The path of the files shared with me was incorrect. + + https://github.com/owncloud/product/issues/204 + https://github.com/cs3org/reva/pull/1346 + + * Bugfix #1351: Fix xattr.Remove error check for macOS + + Previously, we checked the xattr.Remove error only for linux systems. Now macOS is checked + also + + https://github.com/cs3org/reva/pull/1351 + + * Bugfix #1320: Do not panic on remote.php/dav/files/ + + Currently requests to /remote.php/dav/files/ result in panics since we cannot longer strip + the user + destination from the url. This fixes the server response code and adds an error body to + the response. + + https://github.com/cs3org/reva/pull/1320 + + * Bugfix #1379: Make Jaeger agent usable + + Previously, you could not use tracing with jaeger agent because the tracing connector is + always used instead of the tracing endpoint. + + This PR removes the defaults for collector and tracing endpoint. + + https://github.com/cs3org/reva/pull/1379 + + * Bugfix #1331: Fix capabilities response for multiple client versions + + https://github.com/cs3org/reva/pull/1331 + + * Bugfix #1281: When sharing via ocs look up user by username + + The ocs api returns usernames when listing share recipients, so the lookup when creating the + share needs to search the usernames and not the userid. + + https://github.com/cs3org/reva/pull/1281 + + * Bugfix #1334: Handle removal of public shares by token or ID + + Previously different drivers handled removing public shares using different means, either + the token or the ID. Now, both the drivers support both these methods. + + https://github.com/cs3org/reva/pull/1334 + + * Change #990: Replace the user uuid with the username in ocs share responses + + The ocs api should not send the users uuid. Replaced the uuid with the username. + + https://github.com/owncloud/ocis/issues/990 + https://github.com/cs3org/reva/pull/1375 + + * Enhancement #1350: Add auth protocol based on user agent + + Previously, all available credential challenges are given to the client, for example, basic + auth, bearer token, etc ... Different clients have different priorities to use one method or + another, and before it was not possible to force a client to use one method without having a side + effect on other clients. + + This PR adds the functionality to target a specific auth protocol based on the user agent HTTP + header. + + https://github.com/cs3org/reva/pull/1350 + + * Enhancement #1362: Mark 'store-dev-release' CI step as failed on 4XX/5XX errors + + Prevent the errors while storing new 'daily' releases from going unnoticed on the CI. + + https://github.com/cs3org/reva/pull/1362 + + * Enhancement #1364: Remove expired Link on Get + + There is the scenario in which a public link has expired but ListPublicLink has not run, + accessing a technically expired public share is still possible. + + https://github.com/cs3org/reva/pull/1364 + + * Enhancement #1340: Add cache to store UID to UserID mapping in EOS + + Previously, we used to send an RPC to the user provider service for every lookup of user IDs from + the UID stored in EOS. This PR adds an in-memory lock-protected cache to store this mapping. + + https://github.com/cs3org/reva/pull/1340 + + * Enhancement #1154: Add support for the protobuf interface to eos metadata + + https://github.com/cs3org/reva/pull/1154 + + * Enhancement #1154: Merge-rebase from master 10/11/2020 + + https://github.com/cs3org/reva/pull/1154 + + * Enhancement #1359: Add cache for calculated etags for home and shares directory + + Since we store the references in the shares directory instead of actual resources, we need to + calculate the etag on every list/stat call. This is rather expensive so adding a cache would + help to a great extent with regard to the performance. + + https://github.com/cs3org/reva/pull/1359 + + * Enhancement #1321: Add support for multiple data transfer protocols + + Previously, we had to configure which data transfer protocol to use in the dataprovider + service. A previous PR added the functionality to redirect requests to different handlers + based on the request method but that would lead to conflicts if multiple protocols don't + support mutually exclusive sets of requests. This PR adds the functionality to have multiple + such handlers simultaneously and the client can choose which protocol to use. + + https://github.com/cs3org/reva/pull/1321 + https://github.com/cs3org/reva/pull/1285/ + + * Enhancement #1324: Log expected errors with debug level + + While trying to download a non existing file and reading a non existing attribute are + technically an error they are to be expected and nothing an admin can or even should act upon. + + https://github.com/cs3org/reva/pull/1324 + + * Enhancement #1351: Map errtypes to status + + When mapping errtypes to grpc statuses we now also map bad request and not implemented / + unsupported cases in the gateway storageprovider. + + https://github.com/cs3org/reva/pull/1351 + + * Enhancement #1347: Support property to enable health checking on a service + + This update introduces a new service property called `ENABLE_HEALTH_CHECKS` that must be + explicitly set to `true` if a service should be checked for its health status. This allows us to + only enable these checks for partner sites only, skipping vendor sites. + + https://github.com/cs3org/reva/pull/1347 + + * Enhancement #1332: Add import support to Mentix + + This update adds import support to Mentix, transforming it into a **Mesh Entity Exchanger**. + To properly support vendor site management, a new connector that works on a local file has been + added as well. + + https://github.com/cs3org/reva/pull/1332 + + * Enhancement #1371: Use self-hosted Drone CI + + Previously, we used the drone cloud to run the CI for the project. Due to unexpected and sudden + stop of the service for the cs3org we decided to self-host it. + + https://github.com/cs3org/reva/pull/1371 + + * Enhancement #1354: Map bad request and unimplement to http status codes + + We now return a 400 bad request when a grpc call fails with an invalid argument status and a 501 not + implemented when it fails with an unimplemented status. This prevents 500 errors when a user + tries to add resources to the Share folder or a storage does not implement an action. + + https://github.com/cs3org/reva/pull/1354 + + * Enhancement #929: Include share types in ocs propfind responses + + Added the share types to the ocs propfind response when a resource has been shared. + + https://github.com/owncloud/ocis/issues/929 + https://github.com/cs3org/reva/pull/1329 + + * Enhancement #1328: Add CLI commands for public shares + + https://github.com/cs3org/reva/pull/1328 + + * Enhancement #1388: Support range header in GET requests + + To allow resuming a download we now support GET requests with a range header. + + https://github.com/owncloud/ocis-reva/issues/12 + https://github.com/cs3org/reva/pull/1388 + + * Enhancement #1361: Remove expired Link on Access + + Since there is no background jobs scheduled to wipe out expired resources, for the time being + public links are going to be removed on a "on demand" basis, meaning whenever there is an API call + that access the list of shares for a given resource, we will check whether the share is expired + and delete it if so. + + https://github.com/cs3org/reva/pull/1361 + + * Enhancement #1386: Docker image for cs3org/revad:VERSION-eos + + Based on eos:c8_4.8.15 (Centos8, version 4.8.15). To be used when the Reva daemon needs IPC + with xrootd/eos via stdin/out. + + https://github.com/cs3org/reva/pull/1386 + https://github.com/cs3org/reva/pull/1389 + + * Enhancement #1368: Calculate and expose actual file permission set + + Instead of hardcoding the permissions set for every file and folder to ListContainer:true, + CreateContainer:true and always reporting the hardcoded string WCKDNVR for the WebDAV + permissions we now aggregate the actual cs3 resource permission set in the storage drivers and + correctly map them to ocs permissions and webdav permissions using a common role struct that + encapsulates the mapping logic. + + https://github.com/owncloud/ocis/issues/552 + https://github.com/owncloud/ocis/issues/762 + https://github.com/owncloud/ocis/issues/763 + https://github.com/owncloud/ocis/issues/893 + https://github.com/owncloud/ocis/issues/1126 + https://github.com/owncloud/ocis-reva/issues/47 + https://github.com/owncloud/ocis-reva/issues/315 + https://github.com/owncloud/ocis-reva/issues/316 + https://github.com/owncloud/product/issues/270 + https://github.com/cs3org/reva/pull/1368 + + diff --git a/examples/metrics/xcloud.toml b/examples/metrics/xcloud.toml index 7699aa9ad5..432e8d2c5b 100644 --- a/examples/metrics/xcloud.toml +++ b/examples/metrics/xcloud.toml @@ -6,6 +6,7 @@ metrics_data_driver_type = "xcloud" metrics_record_interval = 5000 xcloud_instance="http://localhost" xcloud_interval=5 +xcloud_catalog='https://sciencemesh-test.uni-muenster.de/api/mentix/?action=register' [http.services.prometheus] diff --git a/examples/sdk/sdk.go b/examples/sdk/sdk.go index 362e432e97..05cee60f5b 100644 --- a/examples/sdk/sdk.go +++ b/examples/sdk/sdk.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/grpc-tests/userprovider_test.go b/grpc-tests/userprovider_test.go index ed26cc718c..deae3836ec 100644 --- a/grpc-tests/userprovider_test.go +++ b/grpc-tests/userprovider_test.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/interceptors/appctx/appctx.go b/internal/grpc/interceptors/appctx/appctx.go index fc94df88f8..428a2109d4 100644 --- a/internal/grpc/interceptors/appctx/appctx.go +++ b/internal/grpc/interceptors/appctx/appctx.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/interceptors/auth/auth.go b/internal/grpc/interceptors/auth/auth.go index 8a8814f1a5..9b3599871a 100644 --- a/internal/grpc/interceptors/auth/auth.go +++ b/internal/grpc/interceptors/auth/auth.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/interceptors/loader/loader.go b/internal/grpc/interceptors/loader/loader.go index d50ca9dc5b..b739eab64e 100644 --- a/internal/grpc/interceptors/loader/loader.go +++ b/internal/grpc/interceptors/loader/loader.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/interceptors/log/log.go b/internal/grpc/interceptors/log/log.go index 304d8d937c..b288d3f0c7 100644 --- a/internal/grpc/interceptors/log/log.go +++ b/internal/grpc/interceptors/log/log.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/interceptors/recovery/recovery.go b/internal/grpc/interceptors/recovery/recovery.go index b3d692e012..7abda41ad6 100644 --- a/internal/grpc/interceptors/recovery/recovery.go +++ b/internal/grpc/interceptors/recovery/recovery.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/interceptors/token/token.go b/internal/grpc/interceptors/token/token.go index 5c6566b609..57fd266262 100644 --- a/internal/grpc/interceptors/token/token.go +++ b/internal/grpc/interceptors/token/token.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/appprovider/appprovider.go b/internal/grpc/services/appprovider/appprovider.go index 3755b552c4..90dd2c4a91 100644 --- a/internal/grpc/services/appprovider/appprovider.go +++ b/internal/grpc/services/appprovider/appprovider.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/appprovider/appprovider_test.go b/internal/grpc/services/appprovider/appprovider_test.go index cb660cc050..a0dce7310f 100644 --- a/internal/grpc/services/appprovider/appprovider_test.go +++ b/internal/grpc/services/appprovider/appprovider_test.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/appregistry/appregistry.go b/internal/grpc/services/appregistry/appregistry.go index 508521598c..13806e2490 100644 --- a/internal/grpc/services/appregistry/appregistry.go +++ b/internal/grpc/services/appregistry/appregistry.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/appregistry/appregistry_test.go b/internal/grpc/services/appregistry/appregistry_test.go index a2aca83912..2ad03856e6 100644 --- a/internal/grpc/services/appregistry/appregistry_test.go +++ b/internal/grpc/services/appregistry/appregistry_test.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/authprovider/authprovider.go b/internal/grpc/services/authprovider/authprovider.go index b574c4fc28..abf88f43be 100644 --- a/internal/grpc/services/authprovider/authprovider.go +++ b/internal/grpc/services/authprovider/authprovider.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/authregistry/authregistry.go b/internal/grpc/services/authregistry/authregistry.go index 3e65bc9c2c..ca1071b437 100644 --- a/internal/grpc/services/authregistry/authregistry.go +++ b/internal/grpc/services/authregistry/authregistry.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/datatx/datatx.go b/internal/grpc/services/datatx/datatx.go index c811921bf5..dbda7518f3 100644 --- a/internal/grpc/services/datatx/datatx.go +++ b/internal/grpc/services/datatx/datatx.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/gateway/appprovider.go b/internal/grpc/services/gateway/appprovider.go index 57e98453e2..8e3c3872a6 100644 --- a/internal/grpc/services/gateway/appprovider.go +++ b/internal/grpc/services/gateway/appprovider.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/gateway/appregistry.go b/internal/grpc/services/gateway/appregistry.go index 0c38ce7630..a02f18f9de 100644 --- a/internal/grpc/services/gateway/appregistry.go +++ b/internal/grpc/services/gateway/appregistry.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/gateway/authprovider.go b/internal/grpc/services/gateway/authprovider.go index 3c300ce64e..487094fa6a 100644 --- a/internal/grpc/services/gateway/authprovider.go +++ b/internal/grpc/services/gateway/authprovider.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/gateway/authregistry.go b/internal/grpc/services/gateway/authregistry.go index d88a53fdd6..4e64f650cd 100644 --- a/internal/grpc/services/gateway/authregistry.go +++ b/internal/grpc/services/gateway/authregistry.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/gateway/datatx.go b/internal/grpc/services/gateway/datatx.go index 17e5b9dc56..c4d857b910 100644 --- a/internal/grpc/services/gateway/datatx.go +++ b/internal/grpc/services/gateway/datatx.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/gateway/gateway.go b/internal/grpc/services/gateway/gateway.go index cb6f77a55b..92d308eb56 100644 --- a/internal/grpc/services/gateway/gateway.go +++ b/internal/grpc/services/gateway/gateway.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/gateway/ocmcore.go b/internal/grpc/services/gateway/ocmcore.go index d47ddfc156..e3a6f198f1 100644 --- a/internal/grpc/services/gateway/ocmcore.go +++ b/internal/grpc/services/gateway/ocmcore.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/gateway/ocminvitemanager.go b/internal/grpc/services/gateway/ocminvitemanager.go index 4d0f065f8d..47da1fbcd1 100644 --- a/internal/grpc/services/gateway/ocminvitemanager.go +++ b/internal/grpc/services/gateway/ocminvitemanager.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/gateway/ocmproviderauthorizer.go b/internal/grpc/services/gateway/ocmproviderauthorizer.go index 60919abd0d..92b33d101c 100644 --- a/internal/grpc/services/gateway/ocmproviderauthorizer.go +++ b/internal/grpc/services/gateway/ocmproviderauthorizer.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/gateway/ocmshareprovider.go b/internal/grpc/services/gateway/ocmshareprovider.go index 3063d40247..c663f2b8dd 100644 --- a/internal/grpc/services/gateway/ocmshareprovider.go +++ b/internal/grpc/services/gateway/ocmshareprovider.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/gateway/preferences.go b/internal/grpc/services/gateway/preferences.go index 09bfbffd08..98e09e0a1a 100644 --- a/internal/grpc/services/gateway/preferences.go +++ b/internal/grpc/services/gateway/preferences.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/gateway/publicshareprovider.go b/internal/grpc/services/gateway/publicshareprovider.go index b7894c7b99..203ef19df9 100644 --- a/internal/grpc/services/gateway/publicshareprovider.go +++ b/internal/grpc/services/gateway/publicshareprovider.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/gateway/storageprovider.go b/internal/grpc/services/gateway/storageprovider.go index 6303bb1d3e..dc78d74b7c 100644 --- a/internal/grpc/services/gateway/storageprovider.go +++ b/internal/grpc/services/gateway/storageprovider.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/gateway/userprovider.go b/internal/grpc/services/gateway/userprovider.go index 1cac65b75e..45167a2dc5 100644 --- a/internal/grpc/services/gateway/userprovider.go +++ b/internal/grpc/services/gateway/userprovider.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/gateway/usershareprovider.go b/internal/grpc/services/gateway/usershareprovider.go index 5d5e34a479..53066fdb90 100644 --- a/internal/grpc/services/gateway/usershareprovider.go +++ b/internal/grpc/services/gateway/usershareprovider.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/gateway/webdavstorageprovider.go b/internal/grpc/services/gateway/webdavstorageprovider.go index 161ed3e069..34b49a7461 100644 --- a/internal/grpc/services/gateway/webdavstorageprovider.go +++ b/internal/grpc/services/gateway/webdavstorageprovider.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/helloworld/helloworld.go b/internal/grpc/services/helloworld/helloworld.go index 2cc2c6c9d6..1f8bac3815 100644 --- a/internal/grpc/services/helloworld/helloworld.go +++ b/internal/grpc/services/helloworld/helloworld.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/helloworld/proto/helloworldsvc.pb.go b/internal/grpc/services/helloworld/proto/helloworldsvc.pb.go index 9f3e4d4730..cf29bf5f4a 100644 --- a/internal/grpc/services/helloworld/proto/helloworldsvc.pb.go +++ b/internal/grpc/services/helloworld/proto/helloworldsvc.pb.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/helloworld/proto/helloworldsvc.proto b/internal/grpc/services/helloworld/proto/helloworldsvc.proto index 9334ea8ce6..0d28662b04 100644 --- a/internal/grpc/services/helloworld/proto/helloworldsvc.proto +++ b/internal/grpc/services/helloworld/proto/helloworldsvc.proto @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/loader/loader.go b/internal/grpc/services/loader/loader.go index 6e0f071115..c1608657a9 100644 --- a/internal/grpc/services/loader/loader.go +++ b/internal/grpc/services/loader/loader.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/ocmcore/ocmcore.go b/internal/grpc/services/ocmcore/ocmcore.go index bb8ee28baa..116919505d 100644 --- a/internal/grpc/services/ocmcore/ocmcore.go +++ b/internal/grpc/services/ocmcore/ocmcore.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/ocminvitemanager/ocminvitemanager.go b/internal/grpc/services/ocminvitemanager/ocminvitemanager.go index ce06dc8b87..072fc55a05 100644 --- a/internal/grpc/services/ocminvitemanager/ocminvitemanager.go +++ b/internal/grpc/services/ocminvitemanager/ocminvitemanager.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/ocmproviderauthorizer/ocmproviderauthorizer.go b/internal/grpc/services/ocmproviderauthorizer/ocmproviderauthorizer.go index 97b007d15f..b11c347d5a 100644 --- a/internal/grpc/services/ocmproviderauthorizer/ocmproviderauthorizer.go +++ b/internal/grpc/services/ocmproviderauthorizer/ocmproviderauthorizer.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/ocmshareprovider/ocmshareprovider.go b/internal/grpc/services/ocmshareprovider/ocmshareprovider.go index 89e02de334..15fd779bb5 100644 --- a/internal/grpc/services/ocmshareprovider/ocmshareprovider.go +++ b/internal/grpc/services/ocmshareprovider/ocmshareprovider.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/preferences/preferences.go b/internal/grpc/services/preferences/preferences.go index 569b6ae458..420649a2d9 100644 --- a/internal/grpc/services/preferences/preferences.go +++ b/internal/grpc/services/preferences/preferences.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/publicshareprovider/publicshareprovider.go b/internal/grpc/services/publicshareprovider/publicshareprovider.go index 2f8a143deb..a53faf72db 100644 --- a/internal/grpc/services/publicshareprovider/publicshareprovider.go +++ b/internal/grpc/services/publicshareprovider/publicshareprovider.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/publicstorageprovider/publicstorageprovider.go b/internal/grpc/services/publicstorageprovider/publicstorageprovider.go index f39d76b044..74b82ce637 100644 --- a/internal/grpc/services/publicstorageprovider/publicstorageprovider.go +++ b/internal/grpc/services/publicstorageprovider/publicstorageprovider.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/storageprovider/storageprovider.go b/internal/grpc/services/storageprovider/storageprovider.go index 33b28b8b1c..fc2eadbc85 100644 --- a/internal/grpc/services/storageprovider/storageprovider.go +++ b/internal/grpc/services/storageprovider/storageprovider.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/storageprovider/transcoder.go b/internal/grpc/services/storageprovider/transcoder.go index ecdf6237bf..8ae7532901 100644 --- a/internal/grpc/services/storageprovider/transcoder.go +++ b/internal/grpc/services/storageprovider/transcoder.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/storageregistry/storageregistry.go b/internal/grpc/services/storageregistry/storageregistry.go index 2cc6e3b449..9093a1f5bc 100644 --- a/internal/grpc/services/storageregistry/storageregistry.go +++ b/internal/grpc/services/storageregistry/storageregistry.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/userprovider/userprovider.go b/internal/grpc/services/userprovider/userprovider.go index 5ca4d5ab57..ac83ab2b44 100644 --- a/internal/grpc/services/userprovider/userprovider.go +++ b/internal/grpc/services/userprovider/userprovider.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/grpc/services/usershareprovider/usershareprovider.go b/internal/grpc/services/usershareprovider/usershareprovider.go index 1852a44208..8a23667a69 100644 --- a/internal/grpc/services/usershareprovider/usershareprovider.go +++ b/internal/grpc/services/usershareprovider/usershareprovider.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/interceptors/appctx/appctx.go b/internal/http/interceptors/appctx/appctx.go index 76ac150179..aa959c5590 100644 --- a/internal/http/interceptors/appctx/appctx.go +++ b/internal/http/interceptors/appctx/appctx.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/interceptors/auth/auth.go b/internal/http/interceptors/auth/auth.go index 42d6808b45..37bd8ae0d9 100644 --- a/internal/http/interceptors/auth/auth.go +++ b/internal/http/interceptors/auth/auth.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/interceptors/auth/auth_test.go b/internal/http/interceptors/auth/auth_test.go index bce076806c..d81dd21589 100644 --- a/internal/http/interceptors/auth/auth_test.go +++ b/internal/http/interceptors/auth/auth_test.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/interceptors/auth/credential/loader/loader.go b/internal/http/interceptors/auth/credential/loader/loader.go index 891b4572ac..d67ab160bd 100644 --- a/internal/http/interceptors/auth/credential/loader/loader.go +++ b/internal/http/interceptors/auth/credential/loader/loader.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/interceptors/auth/credential/registry/registry.go b/internal/http/interceptors/auth/credential/registry/registry.go index 5ad8ca5280..0edce0feb3 100644 --- a/internal/http/interceptors/auth/credential/registry/registry.go +++ b/internal/http/interceptors/auth/credential/registry/registry.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/interceptors/auth/credential/strategy/basic/basic.go b/internal/http/interceptors/auth/credential/strategy/basic/basic.go index 57ff70d3e0..ab41523981 100644 --- a/internal/http/interceptors/auth/credential/strategy/basic/basic.go +++ b/internal/http/interceptors/auth/credential/strategy/basic/basic.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/interceptors/auth/credential/strategy/bearer/bearer.go b/internal/http/interceptors/auth/credential/strategy/bearer/bearer.go index 695668fd4a..713aa46396 100644 --- a/internal/http/interceptors/auth/credential/strategy/bearer/bearer.go +++ b/internal/http/interceptors/auth/credential/strategy/bearer/bearer.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/interceptors/auth/token/loader/loader.go b/internal/http/interceptors/auth/token/loader/loader.go index 562312a2d1..504306c227 100644 --- a/internal/http/interceptors/auth/token/loader/loader.go +++ b/internal/http/interceptors/auth/token/loader/loader.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/interceptors/auth/token/registry/registry.go b/internal/http/interceptors/auth/token/registry/registry.go index 91dc35a250..8df2110b61 100644 --- a/internal/http/interceptors/auth/token/registry/registry.go +++ b/internal/http/interceptors/auth/token/registry/registry.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/interceptors/auth/token/strategy/header/header.go b/internal/http/interceptors/auth/token/strategy/header/header.go index f7c53e0579..36dcd6d383 100644 --- a/internal/http/interceptors/auth/token/strategy/header/header.go +++ b/internal/http/interceptors/auth/token/strategy/header/header.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/interceptors/auth/tokenwriter/loader/loader.go b/internal/http/interceptors/auth/tokenwriter/loader/loader.go index 2a23c34b07..92be200869 100644 --- a/internal/http/interceptors/auth/tokenwriter/loader/loader.go +++ b/internal/http/interceptors/auth/tokenwriter/loader/loader.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/interceptors/auth/tokenwriter/registry/registry.go b/internal/http/interceptors/auth/tokenwriter/registry/registry.go index 182a2cf0e7..a0ebd97d9b 100644 --- a/internal/http/interceptors/auth/tokenwriter/registry/registry.go +++ b/internal/http/interceptors/auth/tokenwriter/registry/registry.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/interceptors/auth/tokenwriter/strategy/header/header.go b/internal/http/interceptors/auth/tokenwriter/strategy/header/header.go index 7203218d99..24229d3552 100644 --- a/internal/http/interceptors/auth/tokenwriter/strategy/header/header.go +++ b/internal/http/interceptors/auth/tokenwriter/strategy/header/header.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/interceptors/cors/cors.go b/internal/http/interceptors/cors/cors.go index ac150d8e3a..1d7080ac09 100644 --- a/internal/http/interceptors/cors/cors.go +++ b/internal/http/interceptors/cors/cors.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/interceptors/loader/loader.go b/internal/http/interceptors/loader/loader.go index fbf5e623aa..da5745b7de 100644 --- a/internal/http/interceptors/loader/loader.go +++ b/internal/http/interceptors/loader/loader.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/interceptors/log/log.go b/internal/http/interceptors/log/log.go index 091c632007..3255cc7ad6 100644 --- a/internal/http/interceptors/log/log.go +++ b/internal/http/interceptors/log/log.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/interceptors/providerauthorizer/providerauthorizer.go b/internal/http/interceptors/providerauthorizer/providerauthorizer.go index da213601d1..5664d47b2e 100644 --- a/internal/http/interceptors/providerauthorizer/providerauthorizer.go +++ b/internal/http/interceptors/providerauthorizer/providerauthorizer.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/datagateway/datagateway.go b/internal/http/services/datagateway/datagateway.go index 9e79104a7e..3e396424aa 100644 --- a/internal/http/services/datagateway/datagateway.go +++ b/internal/http/services/datagateway/datagateway.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/dataprovider/dataprovider.go b/internal/http/services/dataprovider/dataprovider.go index c484d5cd55..a87a32081e 100644 --- a/internal/http/services/dataprovider/dataprovider.go +++ b/internal/http/services/dataprovider/dataprovider.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/helloworld/helloworld.go b/internal/http/services/helloworld/helloworld.go index 8e4be51c56..f194b34602 100644 --- a/internal/http/services/helloworld/helloworld.go +++ b/internal/http/services/helloworld/helloworld.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/loader/loader.go b/internal/http/services/loader/loader.go index 4c92606a6e..0013049632 100644 --- a/internal/http/services/loader/loader.go +++ b/internal/http/services/loader/loader.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/mentix/mentix.go b/internal/http/services/mentix/mentix.go index 51d8323ef5..29541b3253 100644 --- a/internal/http/services/mentix/mentix.go +++ b/internal/http/services/mentix/mentix.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/meshdirectory/meshdirectory.go b/internal/http/services/meshdirectory/meshdirectory.go index c5f4130aff..fd2af9528b 100644 --- a/internal/http/services/meshdirectory/meshdirectory.go +++ b/internal/http/services/meshdirectory/meshdirectory.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/metrics/metrics.go b/internal/http/services/metrics/metrics.go index c51d472049..7fee35c6c4 100644 --- a/internal/http/services/metrics/metrics.go +++ b/internal/http/services/metrics/metrics.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/ocmd/config.go b/internal/http/services/ocmd/config.go index 78842d8d8b..b84c0d9b21 100644 --- a/internal/http/services/ocmd/config.go +++ b/internal/http/services/ocmd/config.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/ocmd/invites.go b/internal/http/services/ocmd/invites.go index d90cdd2646..2a1f4a7df1 100644 --- a/internal/http/services/ocmd/invites.go +++ b/internal/http/services/ocmd/invites.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/ocmd/notifications.go b/internal/http/services/ocmd/notifications.go index 203a4c6fc0..a8a13021a4 100644 --- a/internal/http/services/ocmd/notifications.go +++ b/internal/http/services/ocmd/notifications.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/ocmd/ocmd.go b/internal/http/services/ocmd/ocmd.go index 88c731ac5d..81d1f69942 100644 --- a/internal/http/services/ocmd/ocmd.go +++ b/internal/http/services/ocmd/ocmd.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/ocmd/reqres.go b/internal/http/services/ocmd/reqres.go index c658babfdd..ac81567371 100644 --- a/internal/http/services/ocmd/reqres.go +++ b/internal/http/services/ocmd/reqres.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/ocmd/shares.go b/internal/http/services/ocmd/shares.go index a382e49c0f..6be1158068 100644 --- a/internal/http/services/ocmd/shares.go +++ b/internal/http/services/ocmd/shares.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/oidcprovider/auth.go b/internal/http/services/oidcprovider/auth.go index 44fcee756f..029b81895e 100644 --- a/internal/http/services/oidcprovider/auth.go +++ b/internal/http/services/oidcprovider/auth.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/oidcprovider/claims.go b/internal/http/services/oidcprovider/claims.go index ebdac462fa..63a741be78 100644 --- a/internal/http/services/oidcprovider/claims.go +++ b/internal/http/services/oidcprovider/claims.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/oidcprovider/home.go b/internal/http/services/oidcprovider/home.go index 90f7b3c2a0..a8978da3b8 100644 --- a/internal/http/services/oidcprovider/home.go +++ b/internal/http/services/oidcprovider/home.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/oidcprovider/introspect.go b/internal/http/services/oidcprovider/introspect.go index 7aee277473..b24bfe58ce 100644 --- a/internal/http/services/oidcprovider/introspect.go +++ b/internal/http/services/oidcprovider/introspect.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/oidcprovider/oidcprovider.go b/internal/http/services/oidcprovider/oidcprovider.go index 4f18ed60c0..98468e38c5 100644 --- a/internal/http/services/oidcprovider/oidcprovider.go +++ b/internal/http/services/oidcprovider/oidcprovider.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/oidcprovider/revoke.go b/internal/http/services/oidcprovider/revoke.go index c254b5fb05..59717af87f 100644 --- a/internal/http/services/oidcprovider/revoke.go +++ b/internal/http/services/oidcprovider/revoke.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/oidcprovider/sessions.go b/internal/http/services/oidcprovider/sessions.go index a8f6981514..77fca0311a 100644 --- a/internal/http/services/oidcprovider/sessions.go +++ b/internal/http/services/oidcprovider/sessions.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/oidcprovider/token.go b/internal/http/services/oidcprovider/token.go index a68430b130..f7311904f5 100644 --- a/internal/http/services/oidcprovider/token.go +++ b/internal/http/services/oidcprovider/token.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/oidcprovider/userinfo.go b/internal/http/services/oidcprovider/userinfo.go index 68c9cee3f1..9fb47da0ec 100644 --- a/internal/http/services/oidcprovider/userinfo.go +++ b/internal/http/services/oidcprovider/userinfo.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/owncloud/ocdav/avatars.go b/internal/http/services/owncloud/ocdav/avatars.go index 9c273028ee..441abbca38 100644 --- a/internal/http/services/owncloud/ocdav/avatars.go +++ b/internal/http/services/owncloud/ocdav/avatars.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/owncloud/ocdav/copy.go b/internal/http/services/owncloud/ocdav/copy.go index b0fecf3c47..1a7e29a704 100644 --- a/internal/http/services/owncloud/ocdav/copy.go +++ b/internal/http/services/owncloud/ocdav/copy.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -40,8 +40,6 @@ func (s *svc) handleCopy(w http.ResponseWriter, r *http.Request, ns string) { ctx, span := trace.StartSpan(ctx, "head") defer span.End() - ns = applyLayout(ctx, ns) - src := path.Join(ns, r.URL.Path) dstHeader := r.Header.Get("Destination") overwrite := r.Header.Get("Overwrite") diff --git a/internal/http/services/owncloud/ocdav/dav.go b/internal/http/services/owncloud/ocdav/dav.go index c6e95af51c..e3d17a7caf 100644 --- a/internal/http/services/owncloud/ocdav/dav.go +++ b/internal/http/services/owncloud/ocdav/dav.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -57,11 +57,11 @@ func (h *DavHandler) init(c *Config) error { return err } h.FilesHandler = new(WebDavHandler) - if err := h.FilesHandler.init(c.FilesNamespace); err != nil { + if err := h.FilesHandler.init(c.FilesNamespace, false); err != nil { return err } h.FilesHomeHandler = new(WebDavHandler) - if err := h.FilesHomeHandler.init(c.WebdavNamespace); err != nil { + if err := h.FilesHomeHandler.init(c.WebdavNamespace, true); err != nil { return err } h.MetaHandler = new(MetaHandler) @@ -71,7 +71,7 @@ func (h *DavHandler) init(c *Config) error { h.TrashbinHandler = new(TrashbinHandler) h.PublicFolderHandler = new(WebDavHandler) - if err := h.PublicFolderHandler.init("public"); err != nil { // jail public file requests to /public/ prefix + if err := h.PublicFolderHandler.init("public", true); err != nil { // jail public file requests to /public/ prefix return err } diff --git a/internal/http/services/owncloud/ocdav/delete.go b/internal/http/services/owncloud/ocdav/delete.go index 9083ce5db5..0bdf55561a 100644 --- a/internal/http/services/owncloud/ocdav/delete.go +++ b/internal/http/services/owncloud/ocdav/delete.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -33,8 +33,6 @@ func (s *svc) handleDelete(w http.ResponseWriter, r *http.Request, ns string) { ctx, span := trace.StartSpan(ctx, "head") defer span.End() - ns = applyLayout(ctx, ns) - fn := path.Join(ns, r.URL.Path) sublog := appctx.GetLogger(ctx).With().Str("path", fn).Logger() diff --git a/internal/http/services/owncloud/ocdav/error.go b/internal/http/services/owncloud/ocdav/error.go index 561b91ea40..745918d466 100644 --- a/internal/http/services/owncloud/ocdav/error.go +++ b/internal/http/services/owncloud/ocdav/error.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/owncloud/ocdav/get.go b/internal/http/services/owncloud/ocdav/get.go index 484e790354..5e892e8337 100644 --- a/internal/http/services/owncloud/ocdav/get.go +++ b/internal/http/services/owncloud/ocdav/get.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -40,8 +40,6 @@ func (s *svc) handleGet(w http.ResponseWriter, r *http.Request, ns string) { ctx, span := trace.StartSpan(ctx, "get") defer span.End() - ns = applyLayout(ctx, ns) - fn := path.Join(ns, r.URL.Path) sublog := appctx.GetLogger(ctx).With().Str("path", fn).Str("svc", "ocdav").Str("handler", "get").Logger() diff --git a/internal/http/services/owncloud/ocdav/head.go b/internal/http/services/owncloud/ocdav/head.go index c7daae2c51..13d4f1fb02 100644 --- a/internal/http/services/owncloud/ocdav/head.go +++ b/internal/http/services/owncloud/ocdav/head.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -36,8 +36,6 @@ func (s *svc) handleHead(w http.ResponseWriter, r *http.Request, ns string) { ctx, span := trace.StartSpan(ctx, "head") defer span.End() - ns = applyLayout(ctx, ns) - fn := path.Join(ns, r.URL.Path) sublog := appctx.GetLogger(ctx).With().Str("path", fn).Logger() diff --git a/internal/http/services/owncloud/ocdav/lock.go b/internal/http/services/owncloud/ocdav/lock.go index 3f48b74028..65f43cf64c 100644 --- a/internal/http/services/owncloud/ocdav/lock.go +++ b/internal/http/services/owncloud/ocdav/lock.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/owncloud/ocdav/meta.go b/internal/http/services/owncloud/ocdav/meta.go index 09735e8cea..f40baa2396 100644 --- a/internal/http/services/owncloud/ocdav/meta.go +++ b/internal/http/services/owncloud/ocdav/meta.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/owncloud/ocdav/mkcol.go b/internal/http/services/owncloud/ocdav/mkcol.go index 96b74edb2a..c93a8f9f67 100644 --- a/internal/http/services/owncloud/ocdav/mkcol.go +++ b/internal/http/services/owncloud/ocdav/mkcol.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -34,8 +34,6 @@ func (s *svc) handleMkcol(w http.ResponseWriter, r *http.Request, ns string) { ctx, span := trace.StartSpan(ctx, "mkcol") defer span.End() - ns = applyLayout(ctx, ns) - fn := path.Join(ns, r.URL.Path) sublog := appctx.GetLogger(ctx).With().Str("path", fn).Logger() diff --git a/internal/http/services/owncloud/ocdav/move.go b/internal/http/services/owncloud/ocdav/move.go index b754314191..77debda500 100644 --- a/internal/http/services/owncloud/ocdav/move.go +++ b/internal/http/services/owncloud/ocdav/move.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -34,8 +34,6 @@ func (s *svc) handleMove(w http.ResponseWriter, r *http.Request, ns string) { ctx, span := trace.StartSpan(ctx, "move") defer span.End() - ns = applyLayout(ctx, ns) - src := path.Join(ns, r.URL.Path) dstHeader := r.Header.Get("Destination") overwrite := r.Header.Get("Overwrite") diff --git a/internal/http/services/owncloud/ocdav/ocdav.go b/internal/http/services/owncloud/ocdav/ocdav.go index 291d4811fa..ba82880388 100644 --- a/internal/http/services/owncloud/ocdav/ocdav.go +++ b/internal/http/services/owncloud/ocdav/ocdav.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -29,6 +29,7 @@ import ( "time" gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1" + userpb "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" "github.com/cs3org/reva/pkg/appctx" "github.com/cs3org/reva/pkg/rgrpc/todo/pool" @@ -102,7 +103,7 @@ func New(m map[string]interface{}, log *zerolog.Logger) (global.Service, error) ), } // initialize handlers and set default configs - if err := s.webDavHandler.init(conf.WebdavNamespace); err != nil { + if err := s.webDavHandler.init(conf.WebdavNamespace, true); err != nil { return nil, err } if err := s.davHandler.init(conf); err != nil { @@ -186,8 +187,20 @@ func (s *svc) getClient() (gateway.GatewayAPIClient, error) { return pool.GetGatewayServiceClient(s.c.GatewaySvc) } -func applyLayout(ctx context.Context, ns string) string { - return templates.WithUser(ctxuser.ContextMustGetUser(ctx), ns) +func applyLayout(ctx context.Context, ns string, useLoggedInUserNS bool, requestPath string) string { + // If useLoggedInUserNS is false, that implies that the request is coming from + // the FilesHandler method invoked by a /dav/files/fileOwner where fileOwner + // is not the same as the logged in user. In that case, we'll treat fileOwner + // as the username whose files are to be accessed and use that in the + // namespace template. + u, ok := ctxuser.ContextGetUser(ctx) + if !ok || !useLoggedInUserNS { + requestUserID, _ := router.ShiftPath(requestPath) + u = &userpb.User{ + Username: requestUserID, + } + } + return templates.WithUser(u, ns) } func wrapResourceID(r *provider.ResourceId) string { diff --git a/internal/http/services/owncloud/ocdav/options.go b/internal/http/services/owncloud/ocdav/options.go index 3d95863aa0..9fa98d5396 100644 --- a/internal/http/services/owncloud/ocdav/options.go +++ b/internal/http/services/owncloud/ocdav/options.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/owncloud/ocdav/propfind.go b/internal/http/services/owncloud/ocdav/propfind.go index b0c17af211..c56bb11bfb 100644 --- a/internal/http/services/owncloud/ocdav/propfind.go +++ b/internal/http/services/owncloud/ocdav/propfind.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -45,14 +45,20 @@ import ( "github.com/pkg/errors" ) +const ( + _nsDav = "DAV:" + _nsOwncloud = "http://owncloud.org/ns" + _nsOCS = "http://open-collaboration-services.org/ns" + + _propOcFavorite = "http://owncloud.org/ns/favorite" +) + // ns is the namespace that is prefixed to the path in the cs3 namespace func (s *svc) handlePropfind(w http.ResponseWriter, r *http.Request, ns string) { ctx := r.Context() ctx, span := trace.StartSpan(ctx, "propfind") defer span.End() - ns = applyLayout(ctx, ns) - fn := path.Join(ns, r.URL.Path) depth := r.Header.Get("Depth") if depth == "" { @@ -98,14 +104,23 @@ func (s *svc) handlePropfind(w http.ResponseWriter, r *http.Request, ns string) return } + metadataKeys := []string{} + if pf.Allprop != nil { + metadataKeys = append(metadataKeys, "*") + } else { + for i := range pf.Prop { + if requiresExplicitFetching(&pf.Prop[i]) { + metadataKeys = append(metadataKeys, metadataKeyOf(&pf.Prop[i])) + } + } + } + info := res.Info infos := []*provider.ResourceInfo{info} if info.Type == provider.ResourceType_RESOURCE_TYPE_CONTAINER && depth == "1" { req := &provider.ListContainerRequest{ - Ref: ref, - ArbitraryMetadataKeys: []string{ - "http://owncloud.org/ns/share-types", - }, + Ref: ref, + ArbitraryMetadataKeys: metadataKeys, } res, err := client.ListContainer(ctx, req) if err != nil { @@ -130,10 +145,8 @@ func (s *svc) handlePropfind(w http.ResponseWriter, r *http.Request, ns string) Spec: &provider.Reference_Path{Path: path}, } req := &provider.ListContainerRequest{ - Ref: ref, - ArbitraryMetadataKeys: []string{ - "http://owncloud.org/ns/share-types", - }, + Ref: ref, + ArbitraryMetadataKeys: metadataKeys, } res, err := client.ListContainer(ctx, req) if err != nil { @@ -188,6 +201,23 @@ func (s *svc) handlePropfind(w http.ResponseWriter, r *http.Request, ns string) } } +func requiresExplicitFetching(n *xml.Name) bool { + switch n.Space { + case _nsDav: + return false + case _nsOwncloud: + switch n.Local { + case "favorite", "share-types": + return true + default: + return false + } + case _nsOCS: + return false + } + return true +} + // from https://github.com/golang/net/blob/e514e69ffb8bc3c76a71ae40de0118d794855992/webdav/xml.go#L178-L205 func readPropfind(r io.Reader) (pf propfindXML, status int, err error) { c := countingReader{r: r} @@ -253,6 +283,7 @@ func (s *svc) newPropNS(namespace string, local string, val string) *propertyXML } } +// TODO properly use the space func (s *svc) newProp(key, val string) *propertyXML { return &propertyXML{ XMLName: xml.Name{Space: "", Local: key}, @@ -368,8 +399,8 @@ func (s *svc) mdToPropResponse(ctx context.Context, pf *propfindXML, md *provide response.Propstat[0].Prop = append(response.Propstat[0].Prop, s.newProp("oc:favorite", "0")) } else if amd := k.GetMetadata(); amd == nil { response.Propstat[0].Prop = append(response.Propstat[0].Prop, s.newProp("oc:favorite", "0")) - } else if v, ok := amd["http://owncloud.org/ns/favorite"]; ok && v != "" { - response.Propstat[0].Prop = append(response.Propstat[0].Prop, s.newProp("oc:favorite", "1")) + } else if v, ok := amd[_propOcFavorite]; ok && v != "" { + response.Propstat[0].Prop = append(response.Propstat[0].Prop, s.newProp("oc:favorite", v)) } else { response.Propstat[0].Prop = append(response.Propstat[0].Prop, s.newProp("oc:favorite", "0")) } @@ -387,7 +418,7 @@ func (s *svc) mdToPropResponse(ctx context.Context, pf *propfindXML, md *provide size := fmt.Sprintf("%d", md.Size) for i := range pf.Prop { switch pf.Prop[i].Space { - case "http://owncloud.org/ns": + case _nsOwncloud: switch pf.Prop[i].Local { // TODO(jfd): maybe phoenix and the other clients can just use this id as an opaque string? // I tested the desktop client and phoenix to annotate which properties are requestted, see below cases @@ -491,7 +522,7 @@ func (s *svc) mdToPropResponse(ctx context.Context, pf *propfindXML, md *provide propstatOK.Prop = append(propstatOK.Prop, s.newProp("oc:favorite", "0")) } else if amd := k.GetMetadata(); amd == nil { propstatOK.Prop = append(propstatOK.Prop, s.newProp("oc:favorite", "0")) - } else if v, ok := amd["http://owncloud.org/ns/favorite"]; ok && v != "" { + } else if v, ok := amd[_propOcFavorite]; ok && v != "" { propstatOK.Prop = append(propstatOK.Prop, s.newProp("oc:favorite", "1")) } else { propstatOK.Prop = append(propstatOK.Prop, s.newProp("oc:favorite", "0")) @@ -511,7 +542,7 @@ func (s *svc) mdToPropResponse(ctx context.Context, pf *propfindXML, md *provide case "share-types": // desktop k := md.GetArbitraryMetadata() amd := k.GetMetadata() - if amdv, ok := amd[fmt.Sprintf("%s/%s", pf.Prop[i].Space, pf.Prop[i].Local)]; ok { + if amdv, ok := amd[metadataKeyOf(&pf.Prop[i])]; ok { st := fmt.Sprintf("%s", amdv) propstatOK.Prop = append(propstatOK.Prop, s.newProp("oc:share-types", st)) } else { @@ -546,7 +577,7 @@ func (s *svc) mdToPropResponse(ctx context.Context, pf *propfindXML, md *provide default: propstatNotFound.Prop = append(propstatNotFound.Prop, s.newProp("oc:"+pf.Prop[i].Local, "")) } - case "DAV:": + case _nsDav: switch pf.Prop[i].Local { case "getetag": // both if md.Etag != "" { @@ -586,7 +617,7 @@ func (s *svc) mdToPropResponse(ctx context.Context, pf *propfindXML, md *provide default: propstatNotFound.Prop = append(propstatNotFound.Prop, s.newProp("d:"+pf.Prop[i].Local, "")) } - case "http://open-collaboration-services.org/ns": + case _nsOCS: switch pf.Prop[i].Local { // ocs:share-permissions indicate clients the maximum permissions that can be granted: // 1 = read @@ -614,7 +645,7 @@ func (s *svc) mdToPropResponse(ctx context.Context, pf *propfindXML, md *provide propstatNotFound.Prop = append(propstatNotFound.Prop, s.newPropNS(pf.Prop[i].Space, pf.Prop[i].Local, "")) } else if amd := k.GetMetadata(); amd == nil { propstatNotFound.Prop = append(propstatNotFound.Prop, s.newPropNS(pf.Prop[i].Space, pf.Prop[i].Local, "")) - } else if v, ok := amd[fmt.Sprintf("%s/%s", pf.Prop[i].Space, pf.Prop[i].Local)]; ok && v != "" { + } else if v, ok := amd[metadataKeyOf(&pf.Prop[i])]; ok && v != "" { propstatOK.Prop = append(propstatOK.Prop, s.newPropNS(pf.Prop[i].Space, pf.Prop[i].Local, v)) } else { propstatNotFound.Prop = append(propstatNotFound.Prop, s.newPropNS(pf.Prop[i].Space, pf.Prop[i].Local, "")) @@ -654,6 +685,10 @@ func (c *countingReader) Read(p []byte) (int, error) { return n, err } +func metadataKeyOf(n *xml.Name) string { + return fmt.Sprintf("%s/%s", n.Space, n.Local) +} + // http://www.webdav.org/specs/rfc4918.html#ELEMENT_prop (for propfind) type propfindProps []xml.Name diff --git a/internal/http/services/owncloud/ocdav/proppatch.go b/internal/http/services/owncloud/ocdav/proppatch.go index 218bcd5c0f..fd83cd762a 100644 --- a/internal/http/services/owncloud/ocdav/proppatch.go +++ b/internal/http/services/owncloud/ocdav/proppatch.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -44,8 +44,6 @@ func (s *svc) handleProppatch(w http.ResponseWriter, r *http.Request, ns string) acceptedProps := []xml.Name{} removedProps := []xml.Name{} - ns = applyLayout(ctx, ns) - fn := path.Join(ns, r.URL.Path) sublog := appctx.GetLogger(ctx).With().Str("path", fn).Logger() @@ -218,7 +216,7 @@ func (s *svc) formatProppatchResponse(ctx context.Context, acceptedProps []xml.N func (s *svc) isBooleanProperty(prop string) bool { // TODO add other properties we know to be boolean? - return prop == "http://owncloud.org/ns/favorite" + return prop == _propOcFavorite } func (s *svc) as0or1(val string) string { @@ -307,9 +305,9 @@ func readProppatch(r io.Reader) (patches []Proppatch, status int, err error) { for _, op := range pu.SetRemove { remove := false switch op.XMLName { - case xml.Name{Space: "DAV:", Local: "set"}: + case xml.Name{Space: _nsDav, Local: "set"}: // No-op. - case xml.Name{Space: "DAV:", Local: "remove"}: + case xml.Name{Space: _nsDav, Local: "remove"}: for _, p := range op.Prop { if len(p.InnerXML) > 0 { return nil, http.StatusBadRequest, errInvalidProppatch diff --git a/internal/http/services/owncloud/ocdav/publicfile.go b/internal/http/services/owncloud/ocdav/publicfile.go index a1c071c20c..cbb3bc944b 100644 --- a/internal/http/services/owncloud/ocdav/publicfile.go +++ b/internal/http/services/owncloud/ocdav/publicfile.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/owncloud/ocdav/put.go b/internal/http/services/owncloud/ocdav/put.go index b545932bd8..77ac6e8859 100644 --- a/internal/http/services/owncloud/ocdav/put.go +++ b/internal/http/services/owncloud/ocdav/put.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -103,8 +103,6 @@ func isContentRange(r *http.Request) bool { func (s *svc) handlePut(w http.ResponseWriter, r *http.Request, ns string) { ctx := r.Context() - - ns = applyLayout(ctx, ns) fn := path.Join(ns, r.URL.Path) sublog := appctx.GetLogger(ctx).With().Str("path", fn).Logger() diff --git a/internal/http/services/owncloud/ocdav/report.go b/internal/http/services/owncloud/ocdav/report.go index 7cea28f336..3d804a93ca 100644 --- a/internal/http/services/owncloud/ocdav/report.go +++ b/internal/http/services/owncloud/ocdav/report.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/owncloud/ocdav/status.go b/internal/http/services/owncloud/ocdav/status.go index 390cc9dfef..4b857fed05 100644 --- a/internal/http/services/owncloud/ocdav/status.go +++ b/internal/http/services/owncloud/ocdav/status.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/owncloud/ocdav/trashbin.go b/internal/http/services/owncloud/ocdav/trashbin.go index e931bef312..6ebdd0deef 100644 --- a/internal/http/services/owncloud/ocdav/trashbin.go +++ b/internal/http/services/owncloud/ocdav/trashbin.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -295,7 +295,7 @@ func (h *TrashbinHandler) itemToPropResponse(ctx context.Context, s *svc, pf *pr size := fmt.Sprintf("%d", item.Size) for i := range pf.Prop { switch pf.Prop[i].Space { - case "http://owncloud.org/ns": + case _nsOwncloud: switch pf.Prop[i].Local { case "oc:size": if item.Type == provider.ResourceType_RESOURCE_TYPE_CONTAINER { @@ -314,7 +314,7 @@ func (h *TrashbinHandler) itemToPropResponse(ctx context.Context, s *svc, pf *pr default: propstatNotFound.Prop = append(propstatNotFound.Prop, s.newProp("oc:"+pf.Prop[i].Local, "")) } - case "DAV:": + case _nsDav: switch pf.Prop[i].Local { case "getcontentlength": if item.Type == provider.ResourceType_RESOURCE_TYPE_CONTAINER { diff --git a/internal/http/services/owncloud/ocdav/tus.go b/internal/http/services/owncloud/ocdav/tus.go index 0c71cf1979..d173cb752a 100644 --- a/internal/http/services/owncloud/ocdav/tus.go +++ b/internal/http/services/owncloud/ocdav/tus.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -65,8 +65,6 @@ func (s *svc) handleTusPost(w http.ResponseWriter, r *http.Request, ns string) { return } - ns = applyLayout(ctx, ns) - // append filename to current dir fn := path.Join(ns, r.URL.Path, meta["filename"]) diff --git a/internal/http/services/owncloud/ocdav/unlock.go b/internal/http/services/owncloud/ocdav/unlock.go index 240a0f674c..aec38286a6 100644 --- a/internal/http/services/owncloud/ocdav/unlock.go +++ b/internal/http/services/owncloud/ocdav/unlock.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/owncloud/ocdav/versions.go b/internal/http/services/owncloud/ocdav/versions.go index 882babc0f9..61dfe3afc9 100644 --- a/internal/http/services/owncloud/ocdav/versions.go +++ b/internal/http/services/owncloud/ocdav/versions.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/owncloud/ocdav/webdav.go b/internal/http/services/owncloud/ocdav/webdav.go index 5c7e5be7c1..b8693ef97f 100644 --- a/internal/http/services/owncloud/ocdav/webdav.go +++ b/internal/http/services/owncloud/ocdav/webdav.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,46 +25,49 @@ import ( // WebDavHandler implements a dav endpoint type WebDavHandler struct { - namespace string + namespace string + useLoggedInUserNS bool } -func (h *WebDavHandler) init(ns string) error { +func (h *WebDavHandler) init(ns string, useLoggedInUserNS bool) error { h.namespace = path.Join("/", ns) + h.useLoggedInUserNS = useLoggedInUserNS return nil } // Handler handles requests func (h *WebDavHandler) Handler(s *svc) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + ns := applyLayout(r.Context(), h.namespace, h.useLoggedInUserNS, r.URL.Path) switch r.Method { case "PROPFIND": - s.handlePropfind(w, r, h.namespace) + s.handlePropfind(w, r, ns) case "LOCK": - s.handleLock(w, r, h.namespace) + s.handleLock(w, r, ns) case "UNLOCK": - s.handleUnlock(w, r, h.namespace) + s.handleUnlock(w, r, ns) case "PROPPATCH": - s.handleProppatch(w, r, h.namespace) + s.handleProppatch(w, r, ns) case "MKCOL": - s.handleMkcol(w, r, h.namespace) + s.handleMkcol(w, r, ns) case "MOVE": - s.handleMove(w, r, h.namespace) + s.handleMove(w, r, ns) case "COPY": - s.handleCopy(w, r, h.namespace) + s.handleCopy(w, r, ns) case "REPORT": - s.handleReport(w, r, h.namespace) + s.handleReport(w, r, ns) case http.MethodGet: - s.handleGet(w, r, h.namespace) + s.handleGet(w, r, ns) case http.MethodPut: - s.handlePut(w, r, h.namespace) + s.handlePut(w, r, ns) case http.MethodPost: - s.handleTusPost(w, r, h.namespace) + s.handleTusPost(w, r, ns) case http.MethodOptions: - s.handleOptions(w, r, h.namespace) + s.handleOptions(w, r, ns) case http.MethodHead: - s.handleHead(w, r, h.namespace) + s.handleHead(w, r, ns) case http.MethodDelete: - s.handleDelete(w, r, h.namespace) + s.handleDelete(w, r, ns) default: w.WriteHeader(http.StatusNotFound) } diff --git a/internal/http/services/owncloud/ocs/config/config.go b/internal/http/services/owncloud/ocs/config/config.go index bed7cb6400..725be7eacb 100644 --- a/internal/http/services/owncloud/ocs/config/config.go +++ b/internal/http/services/owncloud/ocs/config/config.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/owncloud/ocs/conversions/main.go b/internal/http/services/owncloud/ocs/conversions/main.go index eee896d080..894ef381ef 100644 --- a/internal/http/services/owncloud/ocs/conversions/main.go +++ b/internal/http/services/owncloud/ocs/conversions/main.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/owncloud/ocs/conversions/role.go b/internal/http/services/owncloud/ocs/conversions/role.go index 3a64b921e0..d1b7de605e 100644 --- a/internal/http/services/owncloud/ocs/conversions/role.go +++ b/internal/http/services/owncloud/ocs/conversions/role.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/owncloud/ocs/data/capabilities.go b/internal/http/services/owncloud/ocs/data/capabilities.go index b96bf99b2c..8028030e55 100644 --- a/internal/http/services/owncloud/ocs/data/capabilities.go +++ b/internal/http/services/owncloud/ocs/data/capabilities.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -99,6 +99,7 @@ type CapabilitiesFiles struct { BigFileChunking ocsBool `json:"bigfilechunking" xml:"bigfilechunking"` Undelete ocsBool `json:"undelete" xml:"undelete"` Versioning ocsBool `json:"versioning" xml:"versioning"` + Favorites ocsBool `json:"favorites" xml:"favorites"` BlacklistedFiles []string `json:"blacklisted_files" xml:"blacklisted_files>element" mapstructure:"blacklisted_files"` TusSupport *CapabilitiesFilesTusSupport `json:"tus_support" xml:"tus_support" mapstructure:"tus_support"` } diff --git a/internal/http/services/owncloud/ocs/data/config.go b/internal/http/services/owncloud/ocs/data/config.go index 7f5b201673..20de941665 100644 --- a/internal/http/services/owncloud/ocs/data/config.go +++ b/internal/http/services/owncloud/ocs/data/config.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/owncloud/ocs/handlers/apps/apps.go b/internal/http/services/owncloud/ocs/handlers/apps/apps.go index 8703b3e668..019f124939 100644 --- a/internal/http/services/owncloud/ocs/handlers/apps/apps.go +++ b/internal/http/services/owncloud/ocs/handlers/apps/apps.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/owncloud/ocs/handlers/apps/notifications/notifications.go b/internal/http/services/owncloud/ocs/handlers/apps/notifications/notifications.go index 4717d0335f..9d966af2f1 100644 --- a/internal/http/services/owncloud/ocs/handlers/apps/notifications/notifications.go +++ b/internal/http/services/owncloud/ocs/handlers/apps/notifications/notifications.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/owncloud/ocs/handlers/apps/sharing/sharees/sharees.go b/internal/http/services/owncloud/ocs/handlers/apps/sharing/sharees/sharees.go index bf05c089de..0a2d0f1408 100644 --- a/internal/http/services/owncloud/ocs/handlers/apps/sharing/sharees/sharees.go +++ b/internal/http/services/owncloud/ocs/handlers/apps/sharing/sharees/sharees.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/pending.go b/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/pending.go index 1199e787cd..35d8748c49 100644 --- a/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/pending.go +++ b/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/pending.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/public.go b/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/public.go index 430996df8b..1dbd2582f3 100644 --- a/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/public.go +++ b/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/public.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/remote.go b/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/remote.go index 33fe7df96c..3a889d8bd6 100644 --- a/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/remote.go +++ b/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/remote.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/shares.go b/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/shares.go index 2bc2a2b4e6..bcb93e16f4 100644 --- a/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/shares.go +++ b/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/shares.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/user.go b/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/user.go index e802562c40..3ce051d788 100644 --- a/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/user.go +++ b/internal/http/services/owncloud/ocs/handlers/apps/sharing/shares/user.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/owncloud/ocs/handlers/apps/sharing/sharing.go b/internal/http/services/owncloud/ocs/handlers/apps/sharing/sharing.go index 4d8aa166cd..ed3df32a1c 100644 --- a/internal/http/services/owncloud/ocs/handlers/apps/sharing/sharing.go +++ b/internal/http/services/owncloud/ocs/handlers/apps/sharing/sharing.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/owncloud/ocs/handlers/cloud/capabilities/capabilities.go b/internal/http/services/owncloud/ocs/handlers/cloud/capabilities/capabilities.go index a71a311d15..7b3b0d21df 100644 --- a/internal/http/services/owncloud/ocs/handlers/cloud/capabilities/capabilities.go +++ b/internal/http/services/owncloud/ocs/handlers/cloud/capabilities/capabilities.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -102,6 +102,7 @@ func (h *Handler) Init(c *config.Config) { } // h.c.Capabilities.Files.Undelete is boolean // h.c.Capabilities.Files.Versioning is boolean + // h.c.Capabilities.Files.Favorites is boolean // dav diff --git a/internal/http/services/owncloud/ocs/handlers/cloud/capabilities/capabilities_test.go b/internal/http/services/owncloud/ocs/handlers/cloud/capabilities/capabilities_test.go index 3190f2cee0..2b27d8d3cf 100644 --- a/internal/http/services/owncloud/ocs/handlers/cloud/capabilities/capabilities_test.go +++ b/internal/http/services/owncloud/ocs/handlers/cloud/capabilities/capabilities_test.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/owncloud/ocs/handlers/cloud/capabilities/uploads.go b/internal/http/services/owncloud/ocs/handlers/cloud/capabilities/uploads.go index 4740c9a665..a959790e33 100644 --- a/internal/http/services/owncloud/ocs/handlers/cloud/capabilities/uploads.go +++ b/internal/http/services/owncloud/ocs/handlers/cloud/capabilities/uploads.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/owncloud/ocs/handlers/cloud/cloud.go b/internal/http/services/owncloud/ocs/handlers/cloud/cloud.go index bdc7641930..bb2364f1e3 100644 --- a/internal/http/services/owncloud/ocs/handlers/cloud/cloud.go +++ b/internal/http/services/owncloud/ocs/handlers/cloud/cloud.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/owncloud/ocs/handlers/cloud/user/user.go b/internal/http/services/owncloud/ocs/handlers/cloud/user/user.go index 5f1f450be3..5aaeba2e44 100644 --- a/internal/http/services/owncloud/ocs/handlers/cloud/user/user.go +++ b/internal/http/services/owncloud/ocs/handlers/cloud/user/user.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/owncloud/ocs/handlers/cloud/users/users.go b/internal/http/services/owncloud/ocs/handlers/cloud/users/users.go index c3d30a32aa..fcf4b638c7 100644 --- a/internal/http/services/owncloud/ocs/handlers/cloud/users/users.go +++ b/internal/http/services/owncloud/ocs/handlers/cloud/users/users.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/owncloud/ocs/handlers/config/config.go b/internal/http/services/owncloud/ocs/handlers/config/config.go index b4ed5dfc5a..e010094f16 100644 --- a/internal/http/services/owncloud/ocs/handlers/config/config.go +++ b/internal/http/services/owncloud/ocs/handlers/config/config.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/owncloud/ocs/ocs.go b/internal/http/services/owncloud/ocs/ocs.go index e6ff0ea2ce..a82e0c2463 100644 --- a/internal/http/services/owncloud/ocs/ocs.go +++ b/internal/http/services/owncloud/ocs/ocs.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/owncloud/ocs/response/response.go b/internal/http/services/owncloud/ocs/response/response.go index 4dedb1a30d..e754695116 100644 --- a/internal/http/services/owncloud/ocs/response/response.go +++ b/internal/http/services/owncloud/ocs/response/response.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/owncloud/ocs/v1.go b/internal/http/services/owncloud/ocs/v1.go index f1b163a52a..635ab74de1 100644 --- a/internal/http/services/owncloud/ocs/v1.go +++ b/internal/http/services/owncloud/ocs/v1.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/prometheus/prometheus.go b/internal/http/services/prometheus/prometheus.go index 3f4ff6cdd2..14b6b9ed2f 100644 --- a/internal/http/services/prometheus/prometheus.go +++ b/internal/http/services/prometheus/prometheus.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/sysinfo/sysinfo.go b/internal/http/services/sysinfo/sysinfo.go index 24fcd71edb..65ce0d7949 100644 --- a/internal/http/services/sysinfo/sysinfo.go +++ b/internal/http/services/sysinfo/sysinfo.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/wellknown/openidconfiguration.go b/internal/http/services/wellknown/openidconfiguration.go index 3b2cca22e1..250dd7c397 100644 --- a/internal/http/services/wellknown/openidconfiguration.go +++ b/internal/http/services/wellknown/openidconfiguration.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/wellknown/webfinger.go b/internal/http/services/wellknown/webfinger.go index e39b5c9543..8d4ffc91e9 100644 --- a/internal/http/services/wellknown/webfinger.go +++ b/internal/http/services/wellknown/webfinger.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/internal/http/services/wellknown/wellknown.go b/internal/http/services/wellknown/wellknown.go index 4145070898..524cc4cffd 100644 --- a/internal/http/services/wellknown/wellknown.go +++ b/internal/http/services/wellknown/wellknown.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/app/app.go b/pkg/app/app.go index 1886f56c02..4adb0904dd 100644 --- a/pkg/app/app.go +++ b/pkg/app/app.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/app/provider/demo/demo.go b/pkg/app/provider/demo/demo.go index 319e665f08..928c602b1b 100644 --- a/pkg/app/provider/demo/demo.go +++ b/pkg/app/provider/demo/demo.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/app/registry/static/static.go b/pkg/app/registry/static/static.go index 85aaebddfd..6b419098d8 100644 --- a/pkg/app/registry/static/static.go +++ b/pkg/app/registry/static/static.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/appctx/appctx.go b/pkg/appctx/appctx.go index fcca0e93f0..d28a7d604c 100644 --- a/pkg/appctx/appctx.go +++ b/pkg/appctx/appctx.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/auth/auth.go b/pkg/auth/auth.go index b7de47b1b8..01ecbd4b93 100644 --- a/pkg/auth/auth.go +++ b/pkg/auth/auth.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/auth/manager/demo/demo.go b/pkg/auth/manager/demo/demo.go index 3c91198e01..987ac2437e 100644 --- a/pkg/auth/manager/demo/demo.go +++ b/pkg/auth/manager/demo/demo.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/auth/manager/demo/demo_test.go b/pkg/auth/manager/demo/demo_test.go index f6c651f6ac..5b5c5e0f31 100644 --- a/pkg/auth/manager/demo/demo_test.go +++ b/pkg/auth/manager/demo/demo_test.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/auth/manager/impersonator/impersonator.go b/pkg/auth/manager/impersonator/impersonator.go index 6f7890158b..7478851c5b 100644 --- a/pkg/auth/manager/impersonator/impersonator.go +++ b/pkg/auth/manager/impersonator/impersonator.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/auth/manager/impersonator/impersonator_test.go b/pkg/auth/manager/impersonator/impersonator_test.go index 1435565b4e..41713cd4e4 100644 --- a/pkg/auth/manager/impersonator/impersonator_test.go +++ b/pkg/auth/manager/impersonator/impersonator_test.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/auth/manager/json/json.go b/pkg/auth/manager/json/json.go index 5f5b2f69be..b88f39432e 100644 --- a/pkg/auth/manager/json/json.go +++ b/pkg/auth/manager/json/json.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/auth/manager/json/json_test.go b/pkg/auth/manager/json/json_test.go index 992b5723d9..69347829ec 100644 --- a/pkg/auth/manager/json/json_test.go +++ b/pkg/auth/manager/json/json_test.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/auth/manager/ldap/ldap.go b/pkg/auth/manager/ldap/ldap.go index e43910b9c3..8040b845ab 100644 --- a/pkg/auth/manager/ldap/ldap.go +++ b/pkg/auth/manager/ldap/ldap.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/auth/manager/loader/loader.go b/pkg/auth/manager/loader/loader.go index 23fe5a302e..ad693c5b6c 100644 --- a/pkg/auth/manager/loader/loader.go +++ b/pkg/auth/manager/loader/loader.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/auth/manager/oidc/oidc.go b/pkg/auth/manager/oidc/oidc.go index 8e345478b9..fd7f37baf1 100644 --- a/pkg/auth/manager/oidc/oidc.go +++ b/pkg/auth/manager/oidc/oidc.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/auth/manager/publicshares/publicshares.go b/pkg/auth/manager/publicshares/publicshares.go index ce5a8fcb2e..b6a674b1d3 100644 --- a/pkg/auth/manager/publicshares/publicshares.go +++ b/pkg/auth/manager/publicshares/publicshares.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/auth/manager/registry/registry.go b/pkg/auth/manager/registry/registry.go index 8f7018e5f2..37a164ae1b 100644 --- a/pkg/auth/manager/registry/registry.go +++ b/pkg/auth/manager/registry/registry.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/auth/registry/loader/loader.go b/pkg/auth/registry/loader/loader.go index a22ff6f9fd..fe0f1ef8be 100644 --- a/pkg/auth/registry/loader/loader.go +++ b/pkg/auth/registry/loader/loader.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/auth/registry/registry/registry.go b/pkg/auth/registry/registry/registry.go index 4ab5b27ffd..48e13898fc 100644 --- a/pkg/auth/registry/registry/registry.go +++ b/pkg/auth/registry/registry/registry.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/auth/registry/static/static.go b/pkg/auth/registry/static/static.go index 100e20d637..cb34592bc8 100644 --- a/pkg/auth/registry/static/static.go +++ b/pkg/auth/registry/static/static.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/cbox/loader/loader.go b/pkg/cbox/loader/loader.go index 17b84eaa36..53e11558ae 100644 --- a/pkg/cbox/loader/loader.go +++ b/pkg/cbox/loader/loader.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/cbox/share/sql/conversions.go b/pkg/cbox/share/sql/conversions.go index bfc6fb3aa7..01ebbbf0b4 100644 --- a/pkg/cbox/share/sql/conversions.go +++ b/pkg/cbox/share/sql/conversions.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/cbox/share/sql/sql.go b/pkg/cbox/share/sql/sql.go index 5d1e78b561..d5c6238055 100644 --- a/pkg/cbox/share/sql/sql.go +++ b/pkg/cbox/share/sql/sql.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/cbox/user/rest/cache.go b/pkg/cbox/user/rest/cache.go index 5b27064625..5f9f2611d6 100644 --- a/pkg/cbox/user/rest/cache.go +++ b/pkg/cbox/user/rest/cache.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/cbox/user/rest/rest.go b/pkg/cbox/user/rest/rest.go index c022095ce1..89ec207046 100644 --- a/pkg/cbox/user/rest/rest.go +++ b/pkg/cbox/user/rest/rest.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/crypto/crypto.go b/pkg/crypto/crypto.go index 26eb4df4b8..800bdca303 100644 --- a/pkg/crypto/crypto.go +++ b/pkg/crypto/crypto.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/crypto/crypto_test.go b/pkg/crypto/crypto_test.go index 0569a576a8..1c542f939e 100644 --- a/pkg/crypto/crypto_test.go +++ b/pkg/crypto/crypto_test.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/eosclient/eosbinary/eosbinary.go b/pkg/eosclient/eosbinary/eosbinary.go index 7787fe8eee..b6dde791a4 100644 --- a/pkg/eosclient/eosbinary/eosbinary.go +++ b/pkg/eosclient/eosbinary/eosbinary.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/eosclient/eosclient.go b/pkg/eosclient/eosclient.go index 370b70ce73..a9cf3f9a3d 100644 --- a/pkg/eosclient/eosclient.go +++ b/pkg/eosclient/eosclient.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/eosclient/eosgrpc/eos_grpc/eos_grpc.pb.go b/pkg/eosclient/eosgrpc/eos_grpc/eos_grpc.pb.go index 432587081b..73cb723725 100644 --- a/pkg/eosclient/eosgrpc/eos_grpc/eos_grpc.pb.go +++ b/pkg/eosclient/eosgrpc/eos_grpc/eos_grpc.pb.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/eosclient/eosgrpc/eosgrpc.go b/pkg/eosclient/eosgrpc/eosgrpc.go index b566e6954d..ef3d8a8ed5 100644 --- a/pkg/eosclient/eosgrpc/eosgrpc.go +++ b/pkg/eosclient/eosgrpc/eosgrpc.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/errtypes/errtypes.go b/pkg/errtypes/errtypes.go index cd719ee216..aa50e7c7d6 100644 --- a/pkg/errtypes/errtypes.go +++ b/pkg/errtypes/errtypes.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/logger/logger.go b/pkg/logger/logger.go index b8acc76058..ae861d0bd0 100644 --- a/pkg/logger/logger.go +++ b/pkg/logger/logger.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/config/config.go b/pkg/mentix/config/config.go index f43c4e6dfd..d37d64e383 100644 --- a/pkg/mentix/config/config.go +++ b/pkg/mentix/config/config.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/config/ids.go b/pkg/mentix/config/ids.go index 979c60885f..04ff545ec3 100644 --- a/pkg/mentix/config/ids.go +++ b/pkg/mentix/config/ids.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/connectors/connector.go b/pkg/mentix/connectors/connector.go index 5684ff27eb..1d9504819b 100755 --- a/pkg/mentix/connectors/connector.go +++ b/pkg/mentix/connectors/connector.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/connectors/connectors.go b/pkg/mentix/connectors/connectors.go index d3944e93c5..ceae58107e 100644 --- a/pkg/mentix/connectors/connectors.go +++ b/pkg/mentix/connectors/connectors.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/connectors/gocdb.go b/pkg/mentix/connectors/gocdb.go index 9ac1a4399c..7551775894 100755 --- a/pkg/mentix/connectors/gocdb.go +++ b/pkg/mentix/connectors/gocdb.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/connectors/gocdb/query.go b/pkg/mentix/connectors/gocdb/query.go index e633990bbf..8a188489b4 100755 --- a/pkg/mentix/connectors/gocdb/query.go +++ b/pkg/mentix/connectors/gocdb/query.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/connectors/gocdb/types.go b/pkg/mentix/connectors/gocdb/types.go index 24712b2319..8e5da543ae 100755 --- a/pkg/mentix/connectors/gocdb/types.go +++ b/pkg/mentix/connectors/gocdb/types.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/connectors/localfile.go b/pkg/mentix/connectors/localfile.go index 15918375e3..b5b15eda9a 100755 --- a/pkg/mentix/connectors/localfile.go +++ b/pkg/mentix/connectors/localfile.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/entity/entities.go b/pkg/mentix/entity/entities.go index a068e04759..cb18220f6e 100644 --- a/pkg/mentix/entity/entities.go +++ b/pkg/mentix/entity/entities.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/entity/entity.go b/pkg/mentix/entity/entity.go index 11d99f2654..c4f051de64 100644 --- a/pkg/mentix/entity/entity.go +++ b/pkg/mentix/entity/entity.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/entity/registry.go b/pkg/mentix/entity/registry.go index 0cf44800a9..fcdb1e5be6 100644 --- a/pkg/mentix/entity/registry.go +++ b/pkg/mentix/entity/registry.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/exchangers/exchanger.go b/pkg/mentix/exchangers/exchanger.go index 6fae3ab5c7..e3a3f2f534 100644 --- a/pkg/mentix/exchangers/exchanger.go +++ b/pkg/mentix/exchangers/exchanger.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/exchangers/exchangers.go b/pkg/mentix/exchangers/exchangers.go index e93d4bb4f1..cf1789d33e 100644 --- a/pkg/mentix/exchangers/exchangers.go +++ b/pkg/mentix/exchangers/exchangers.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/exchangers/exporters/cs3api.go b/pkg/mentix/exchangers/exporters/cs3api.go index 849de25591..1ed15eb7e2 100755 --- a/pkg/mentix/exchangers/exporters/cs3api.go +++ b/pkg/mentix/exchangers/exporters/cs3api.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/exchangers/exporters/cs3api/query.go b/pkg/mentix/exchangers/exporters/cs3api/query.go index 7419928105..a107a1cce8 100755 --- a/pkg/mentix/exchangers/exporters/cs3api/query.go +++ b/pkg/mentix/exchangers/exporters/cs3api/query.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/exchangers/exporters/exporter.go b/pkg/mentix/exchangers/exporters/exporter.go index a52306d0de..51cd604b40 100755 --- a/pkg/mentix/exchangers/exporters/exporter.go +++ b/pkg/mentix/exchangers/exporters/exporter.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/exchangers/exporters/exporters.go b/pkg/mentix/exchangers/exporters/exporters.go index adee370e4c..98d6040100 100644 --- a/pkg/mentix/exchangers/exporters/exporters.go +++ b/pkg/mentix/exchangers/exporters/exporters.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/exchangers/exporters/prometheus/types.go b/pkg/mentix/exchangers/exporters/prometheus/types.go index b8061b89c9..4c0a534d75 100755 --- a/pkg/mentix/exchangers/exporters/prometheus/types.go +++ b/pkg/mentix/exchangers/exporters/prometheus/types.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/exchangers/exporters/promsd.go b/pkg/mentix/exchangers/exporters/promsd.go index 6a30cb763d..bbdf717c23 100755 --- a/pkg/mentix/exchangers/exporters/promsd.go +++ b/pkg/mentix/exchangers/exporters/promsd.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/exchangers/exporters/reqexporter.go b/pkg/mentix/exchangers/exporters/reqexporter.go index 83bca263bf..368bb56260 100644 --- a/pkg/mentix/exchangers/exporters/reqexporter.go +++ b/pkg/mentix/exchangers/exporters/reqexporter.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/exchangers/exporters/siteloc/query.go b/pkg/mentix/exchangers/exporters/siteloc/query.go index ad7434b939..491462d5e1 100755 --- a/pkg/mentix/exchangers/exporters/siteloc/query.go +++ b/pkg/mentix/exchangers/exporters/siteloc/query.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/exchangers/exporters/siteloc/types.go b/pkg/mentix/exchangers/exporters/siteloc/types.go index 763e1ff944..10b2979947 100644 --- a/pkg/mentix/exchangers/exporters/siteloc/types.go +++ b/pkg/mentix/exchangers/exporters/siteloc/types.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/exchangers/exporters/sitelocations.go b/pkg/mentix/exchangers/exporters/sitelocations.go index fffd6325c1..f00b8d625a 100755 --- a/pkg/mentix/exchangers/exporters/sitelocations.go +++ b/pkg/mentix/exchangers/exporters/sitelocations.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/exchangers/exporters/webapi.go b/pkg/mentix/exchangers/exporters/webapi.go index 346cc10907..dee73a4f16 100755 --- a/pkg/mentix/exchangers/exporters/webapi.go +++ b/pkg/mentix/exchangers/exporters/webapi.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/exchangers/exporters/webapi/query.go b/pkg/mentix/exchangers/exporters/webapi/query.go index 3e2027fa8e..362968fecb 100755 --- a/pkg/mentix/exchangers/exporters/webapi/query.go +++ b/pkg/mentix/exchangers/exporters/webapi/query.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/exchangers/importers/importer.go b/pkg/mentix/exchangers/importers/importer.go index 62413966d6..e6625bc868 100755 --- a/pkg/mentix/exchangers/importers/importer.go +++ b/pkg/mentix/exchangers/importers/importer.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/exchangers/importers/importers.go b/pkg/mentix/exchangers/importers/importers.go index 7ce62026e1..152a2a1b55 100644 --- a/pkg/mentix/exchangers/importers/importers.go +++ b/pkg/mentix/exchangers/importers/importers.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/exchangers/importers/reqimporter.go b/pkg/mentix/exchangers/importers/reqimporter.go index 1f4d4767bf..2a6a84eeae 100644 --- a/pkg/mentix/exchangers/importers/reqimporter.go +++ b/pkg/mentix/exchangers/importers/reqimporter.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/exchangers/importers/webapi.go b/pkg/mentix/exchangers/importers/webapi.go index ac42fd0750..d1214a0fd9 100755 --- a/pkg/mentix/exchangers/importers/webapi.go +++ b/pkg/mentix/exchangers/importers/webapi.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/exchangers/importers/webapi/query.go b/pkg/mentix/exchangers/importers/webapi/query.go index bc99011a80..aceb4d65b2 100755 --- a/pkg/mentix/exchangers/importers/webapi/query.go +++ b/pkg/mentix/exchangers/importers/webapi/query.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/exchangers/reqexchanger.go b/pkg/mentix/exchangers/reqexchanger.go index c8cd381655..427d99fc05 100644 --- a/pkg/mentix/exchangers/reqexchanger.go +++ b/pkg/mentix/exchangers/reqexchanger.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/mentix.go b/pkg/mentix/mentix.go index 88ec87ae3c..684cc10106 100644 --- a/pkg/mentix/mentix.go +++ b/pkg/mentix/mentix.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/meshdata/meshdata.go b/pkg/mentix/meshdata/meshdata.go index 5162dab859..23ecfb5185 100644 --- a/pkg/mentix/meshdata/meshdata.go +++ b/pkg/mentix/meshdata/meshdata.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/meshdata/properties.go b/pkg/mentix/meshdata/properties.go index b4962b4b0e..524be3c2b0 100644 --- a/pkg/mentix/meshdata/properties.go +++ b/pkg/mentix/meshdata/properties.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/meshdata/service.go b/pkg/mentix/meshdata/service.go index a77d84d5bf..30af06f408 100644 --- a/pkg/mentix/meshdata/service.go +++ b/pkg/mentix/meshdata/service.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/meshdata/site.go b/pkg/mentix/meshdata/site.go index 7fd5c5d120..a21432f1fd 100644 --- a/pkg/mentix/meshdata/site.go +++ b/pkg/mentix/meshdata/site.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/meshdata/types.go b/pkg/mentix/meshdata/types.go index f7cd17d9bb..378b5bcf1c 100644 --- a/pkg/mentix/meshdata/types.go +++ b/pkg/mentix/meshdata/types.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mentix/network/utils.go b/pkg/mentix/network/utils.go index 52be0075cf..c2c9ac7b2c 100644 --- a/pkg/mentix/network/utils.go +++ b/pkg/mentix/network/utils.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/metrics/config/config.go b/pkg/metrics/config/config.go index 98ebe0070b..424e5e1659 100644 --- a/pkg/metrics/config/config.go +++ b/pkg/metrics/config/config.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/metrics/driver/dummy/dummy.go b/pkg/metrics/driver/dummy/dummy.go index 9b305fc41b..6eb1068471 100644 --- a/pkg/metrics/driver/dummy/dummy.go +++ b/pkg/metrics/driver/dummy/dummy.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/metrics/driver/json/json.go b/pkg/metrics/driver/json/json.go index a7f23af54d..43ed354947 100644 --- a/pkg/metrics/driver/json/json.go +++ b/pkg/metrics/driver/json/json.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/metrics/driver/loader/loader.go b/pkg/metrics/driver/loader/loader.go index fcc6a1f9db..82fd0ba7f6 100644 --- a/pkg/metrics/driver/loader/loader.go +++ b/pkg/metrics/driver/loader/loader.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/metrics/driver/registry/registry.go b/pkg/metrics/driver/registry/registry.go index 6c982619f6..a92fde4463 100644 --- a/pkg/metrics/driver/registry/registry.go +++ b/pkg/metrics/driver/registry/registry.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/metrics/driver/xcloud/xcloud.go b/pkg/metrics/driver/xcloud/xcloud.go index 5eacd90065..adaf85bf23 100644 --- a/pkg/metrics/driver/xcloud/xcloud.go +++ b/pkg/metrics/driver/xcloud/xcloud.go @@ -19,6 +19,8 @@ package json import ( + "bytes" + "crypto/tls" "encoding/json" "errors" "fmt" @@ -48,7 +50,7 @@ func driverName() string { return "xcloud" } -// CloudDriver the JsonDriver struct +// CloudDriver is the driver to use for Sciencemesh apps type CloudDriver struct { instance string catalog string @@ -62,7 +64,10 @@ func (d *CloudDriver) refresh() error { // get configuration from internal_metrics endpoint exposed // by the sciencemesh app - client := &http.Client{} + tr := &http.Transport{ + TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, + } + client := &http.Client{Transport: tr} // endpoint example: https://mybox.com or https://mybox.com/owncloud endpoint := fmt.Sprintf("%s/index.php/apps/sciencemesh/internal_metrics", d.instance) @@ -80,7 +85,7 @@ func (d *CloudDriver) refresh() error { } if resp.StatusCode != http.StatusOK { - err := fmt.Errorf("xcloud: error getting internal metrics from %s. http status code (%d)", resp.StatusCode) + err := fmt.Errorf("xcloud: error getting internal metrics from %s. http status code (%d)", d.instance, resp.StatusCode) log.Err(err).Msgf("xcloud: error getting internal metrics from %s", d.instance) return err } @@ -104,33 +109,6 @@ func (d *CloudDriver) refresh() error { d.CloudData = cd log.Info().Msgf("xcloud: received internal metrics from cloud provider: %+v", cd) - // if catalog is set, register site continously, this helps to also monitorize the health - // "xcloud: received internal metrics from cloud provider: &{Metrics:{TotalUsers:1 TotalGroups:0 TotalStorage:0} Settings:{IOPUrl:http://localhost:5550 Sitename:CERN Hostname:localhost Country:CH}}" - // - /* - { - "Name": "OC-Test@WWU", - "FullName": "ownCloud Test at University of Muenster", - "Homepage": "http://oc-test.uni-muenster.de", - "Description": "ownCloud Test Instance of University of Muenster", - "CountryCode": "DE", - "Services": [ - { - "Type": { - "Name": "REVAD" - }, - "Name": "oc-test.uni-muenster.de - REVAD", - "URL": "https://oc-test.uni-muenster.de/revad", - "IsMonitored": true, - "Properties": { - "METRICS_PATH": "/revad/metrics" - }, - "Host": "octest-test.uni-muenster.de" - } - ] - } - */ - mc := &MentixCatalog{ Name: cd.Settings.Sitename, FullName: cd.Settings.Sitename, @@ -139,26 +117,47 @@ func (d *CloudDriver) refresh() error { CountryCode: cd.Settings.Country, Services: []*MentixService{ &MentixService{ - Host: cd.Settings.Hostname, + Host: cd.Settings.Hostname, IsMonitored: true, - Name: cd.Settings.Hostname + " - REVAD", - URL: " - - /* - & - Host string `json:"Host"` - IsMonitored bool `json:"IsMonitored"` - Name string `json:"Name"` - Properties *MentixServiceProperties `json:"Properties"` - Type *MentixServiceType `json:"Type"` - URL string `json:"URL"` - */ + Name: cd.Settings.Hostname + " - REVAD", + URL: cd.Settings.Siteurl, + Properties: &MentixServiceProperties{ + MetricsPath: "/index.php/apps/sciencemesh/metrics", + }, + Type: &MentixServiceType{ + Name: "REVAD", + }, }, }, } - return nil + j, err := json.Marshal(mc) + if err != nil { + log.Err(err).Msgf("xcloud: error marhsaling mentix calalog info") + return err + } + + log.Info().Msgf("xcloud: info to send to register: %s", string(j)) + + // send to register if catalog is set + req, err = http.NewRequest("POST", d.catalog, bytes.NewBuffer(j)) + if err != nil { + log.Err(err).Msgf("xcloud: error creating POST request to: %s", d.catalog) + return err + } + + resp, err = client.Do(req) + if err != nil { + log.Err(err).Msgf("xcloud: error registering catalog info to: %s with info: %s", d.catalog, string(j)) + return err + } + + defer resp.Body.Close() + body, _ := ioutil.ReadAll(resp.Body) + log.Info().Msgf("xcloud: site registered: %s", string(body)) + + return nil } // Configure configures this driver @@ -174,6 +173,7 @@ func (d *CloudDriver) Configure(c *config.Config) error { d.instance = c.XcloudInstance d.pullInterval = c.XcloudPullInterval + d.catalog = c.XcloudCatalog ticker := time.NewTicker(time.Duration(d.pullInterval) * time.Second) quit := make(chan struct{}) @@ -181,7 +181,8 @@ func (d *CloudDriver) Configure(c *config.Config) error { for { select { case <-ticker.C: - d.refresh() + err := d.refresh() + log.Err(err).Msgf("xcloud: error from refresh goroutine") case <-quit: ticker.Stop() return @@ -207,24 +208,29 @@ func (d *CloudDriver) GetAmountStorage() int64 { return d.CloudData.Metrics.TotalStorage } +// CloudData represents the information obtained from the sciencemesh app type CloudData struct { Metrics CloudDataMetrics `json:"metrics"` Settings CloudDataSettings `json:"settings"` } +// CloudDataMetrics reprents the metrics gathered from the sciencemesh app type CloudDataMetrics struct { TotalUsers int64 `json:"total_users"` TotalGroups int64 `json:"total_groups"` TotalStorage int64 `json:"total_storage"` } +// CloudDataSettings represents the metrics gathered type CloudDataSettings struct { IOPUrl string `json:"iopurl"` Sitename string `json:"sitename"` + Siteurl string `json:"siteurl"` Hostname string `json:"hostname"` Country string `json:"country"` } +// MentixCatalog represents the information needed to register a site into the mesh type MentixCatalog struct { CountryCode string `json:"CountryCode"` Description string `json:"Description"` @@ -234,6 +240,7 @@ type MentixCatalog struct { Services []*MentixService `json:"Services"` } +// MentixService represents the service running in a site type MentixService struct { Host string `json:"Host"` IsMonitored bool `json:"IsMonitored"` @@ -243,9 +250,12 @@ type MentixService struct { URL string `json:"URL"` } +// MentixServiceProperties represents the properties to expose the metrics endpoint type MentixServiceProperties struct { MetricsPath string `json:"METRICS_PATH"` } + +// MentixServiceType represents the type of service running type MentixServiceType struct { Name string `json:"Name"` } diff --git a/pkg/metrics/metrics.go b/pkg/metrics/metrics.go index 586e4dd41f..ec3fd12fb1 100644 --- a/pkg/metrics/metrics.go +++ b/pkg/metrics/metrics.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/metrics/reader/reader.go b/pkg/metrics/reader/reader.go index 650e50bdd8..88189b11d9 100644 --- a/pkg/metrics/reader/reader.go +++ b/pkg/metrics/reader/reader.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/mime/mime.go b/pkg/mime/mime.go index d1bd356311..b29d3552ff 100644 --- a/pkg/mime/mime.go +++ b/pkg/mime/mime.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/ocm/invite/invite.go b/pkg/ocm/invite/invite.go index 2b8c986e6e..9c11b248e5 100644 --- a/pkg/ocm/invite/invite.go +++ b/pkg/ocm/invite/invite.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/ocm/invite/manager/json/json.go b/pkg/ocm/invite/manager/json/json.go index c82d04ed88..49fc0880b8 100644 --- a/pkg/ocm/invite/manager/json/json.go +++ b/pkg/ocm/invite/manager/json/json.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/ocm/invite/manager/loader/loader.go b/pkg/ocm/invite/manager/loader/loader.go index 962a170c82..4f531f9639 100644 --- a/pkg/ocm/invite/manager/loader/loader.go +++ b/pkg/ocm/invite/manager/loader/loader.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/ocm/invite/manager/memory/memory.go b/pkg/ocm/invite/manager/memory/memory.go index 0dfc4c2822..9a0350b35e 100644 --- a/pkg/ocm/invite/manager/memory/memory.go +++ b/pkg/ocm/invite/manager/memory/memory.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/ocm/invite/manager/registry/registry.go b/pkg/ocm/invite/manager/registry/registry.go index 0d63d73735..8f750b79d4 100644 --- a/pkg/ocm/invite/manager/registry/registry.go +++ b/pkg/ocm/invite/manager/registry/registry.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/ocm/invite/token/token.go b/pkg/ocm/invite/token/token.go index a31cf1dbff..9c7dd3460a 100644 --- a/pkg/ocm/invite/token/token.go +++ b/pkg/ocm/invite/token/token.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/ocm/invite/token/token_test.go b/pkg/ocm/invite/token/token_test.go index e50718aa4d..4c65c30398 100644 --- a/pkg/ocm/invite/token/token_test.go +++ b/pkg/ocm/invite/token/token_test.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/ocm/provider/authorizer/json/json.go b/pkg/ocm/provider/authorizer/json/json.go index a438fac431..ca62034900 100644 --- a/pkg/ocm/provider/authorizer/json/json.go +++ b/pkg/ocm/provider/authorizer/json/json.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/ocm/provider/authorizer/loader/loader.go b/pkg/ocm/provider/authorizer/loader/loader.go index ae3c7026ea..c4663ec234 100644 --- a/pkg/ocm/provider/authorizer/loader/loader.go +++ b/pkg/ocm/provider/authorizer/loader/loader.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/ocm/provider/authorizer/mentix/mentix.go b/pkg/ocm/provider/authorizer/mentix/mentix.go index fe26c9bef4..cc665e001b 100644 --- a/pkg/ocm/provider/authorizer/mentix/mentix.go +++ b/pkg/ocm/provider/authorizer/mentix/mentix.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/ocm/provider/authorizer/open/open.go b/pkg/ocm/provider/authorizer/open/open.go index c62753ae5d..e3b6e31494 100644 --- a/pkg/ocm/provider/authorizer/open/open.go +++ b/pkg/ocm/provider/authorizer/open/open.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/ocm/provider/authorizer/registry/registry.go b/pkg/ocm/provider/authorizer/registry/registry.go index bd581d8cb7..c474d5be95 100644 --- a/pkg/ocm/provider/authorizer/registry/registry.go +++ b/pkg/ocm/provider/authorizer/registry/registry.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/ocm/provider/provider.go b/pkg/ocm/provider/provider.go index 82b464c34e..6a793cc729 100644 --- a/pkg/ocm/provider/provider.go +++ b/pkg/ocm/provider/provider.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/ocm/share/manager/json/json.go b/pkg/ocm/share/manager/json/json.go index 8eda0ebe5f..dd77c14fcc 100644 --- a/pkg/ocm/share/manager/json/json.go +++ b/pkg/ocm/share/manager/json/json.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/ocm/share/manager/loader/loader.go b/pkg/ocm/share/manager/loader/loader.go index 83b35b0b8e..817a1270b4 100644 --- a/pkg/ocm/share/manager/loader/loader.go +++ b/pkg/ocm/share/manager/loader/loader.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/ocm/share/manager/memory/memory.go b/pkg/ocm/share/manager/memory/memory.go index 7548694ce8..9473d4b62b 100644 --- a/pkg/ocm/share/manager/memory/memory.go +++ b/pkg/ocm/share/manager/memory/memory.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/ocm/share/manager/memory/memory_test.go b/pkg/ocm/share/manager/memory/memory_test.go index 785e047550..ce54095b09 100644 --- a/pkg/ocm/share/manager/memory/memory_test.go +++ b/pkg/ocm/share/manager/memory/memory_test.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/ocm/share/manager/registry/registry.go b/pkg/ocm/share/manager/registry/registry.go index 334e2e4aab..8ea0628fc9 100644 --- a/pkg/ocm/share/manager/registry/registry.go +++ b/pkg/ocm/share/manager/registry/registry.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/ocm/share/share.go b/pkg/ocm/share/share.go index cce1eb7517..428ab86713 100644 --- a/pkg/ocm/share/share.go +++ b/pkg/ocm/share/share.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/publicshare/manager/json/json.go b/pkg/publicshare/manager/json/json.go index d190c39a61..b4c807e9a7 100644 --- a/pkg/publicshare/manager/json/json.go +++ b/pkg/publicshare/manager/json/json.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/publicshare/manager/loader/loader.go b/pkg/publicshare/manager/loader/loader.go index f7dbf0cfb9..5101d1e109 100644 --- a/pkg/publicshare/manager/loader/loader.go +++ b/pkg/publicshare/manager/loader/loader.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/publicshare/manager/memory/memory.go b/pkg/publicshare/manager/memory/memory.go index 81c664983d..22ac44be7e 100644 --- a/pkg/publicshare/manager/memory/memory.go +++ b/pkg/publicshare/manager/memory/memory.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/publicshare/manager/memory/memory_test.go b/pkg/publicshare/manager/memory/memory_test.go index 7dc40c430e..78a6b0a61e 100644 --- a/pkg/publicshare/manager/memory/memory_test.go +++ b/pkg/publicshare/manager/memory/memory_test.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/publicshare/manager/registry/registry.go b/pkg/publicshare/manager/registry/registry.go index 061105aea7..fa9f1d1a93 100644 --- a/pkg/publicshare/manager/registry/registry.go +++ b/pkg/publicshare/manager/registry/registry.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/publicshare/publicshare.go b/pkg/publicshare/publicshare.go index 25a7f9247b..7a328c5598 100644 --- a/pkg/publicshare/publicshare.go +++ b/pkg/publicshare/publicshare.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/rgrpc/rgrpc.go b/pkg/rgrpc/rgrpc.go index 75813f2d86..a5ad5c55da 100644 --- a/pkg/rgrpc/rgrpc.go +++ b/pkg/rgrpc/rgrpc.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/rgrpc/status/status.go b/pkg/rgrpc/status/status.go index 8a33368d85..7a4dd6f176 100644 --- a/pkg/rgrpc/status/status.go +++ b/pkg/rgrpc/status/status.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/rgrpc/todo/pool/pool.go b/pkg/rgrpc/todo/pool/pool.go index 56d3764a42..fb7108af77 100644 --- a/pkg/rgrpc/todo/pool/pool.go +++ b/pkg/rgrpc/todo/pool/pool.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/rgrpc/todo/utils/utils.go b/pkg/rgrpc/todo/utils/utils.go index 4d5100dd73..b9410cd579 100644 --- a/pkg/rgrpc/todo/utils/utils.go +++ b/pkg/rgrpc/todo/utils/utils.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/rhttp/client.go b/pkg/rhttp/client.go index 3d819a58be..e080b20a0b 100644 --- a/pkg/rhttp/client.go +++ b/pkg/rhttp/client.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/rhttp/datatx/datatx.go b/pkg/rhttp/datatx/datatx.go index 16eb64ac42..716efb2931 100644 --- a/pkg/rhttp/datatx/datatx.go +++ b/pkg/rhttp/datatx/datatx.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/rhttp/datatx/manager/loader/loader.go b/pkg/rhttp/datatx/manager/loader/loader.go index be6eba0cc2..be814f3e86 100644 --- a/pkg/rhttp/datatx/manager/loader/loader.go +++ b/pkg/rhttp/datatx/manager/loader/loader.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/rhttp/datatx/manager/registry/registry.go b/pkg/rhttp/datatx/manager/registry/registry.go index 56e152c0c4..a99b70ecee 100644 --- a/pkg/rhttp/datatx/manager/registry/registry.go +++ b/pkg/rhttp/datatx/manager/registry/registry.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/rhttp/datatx/manager/simple/simple.go b/pkg/rhttp/datatx/manager/simple/simple.go index 69e2fa985b..7de66a7ee9 100644 --- a/pkg/rhttp/datatx/manager/simple/simple.go +++ b/pkg/rhttp/datatx/manager/simple/simple.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/rhttp/datatx/manager/tus/tus.go b/pkg/rhttp/datatx/manager/tus/tus.go index 5803054df5..09694cb68a 100644 --- a/pkg/rhttp/datatx/manager/tus/tus.go +++ b/pkg/rhttp/datatx/manager/tus/tus.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/rhttp/datatx/utils/download/download.go b/pkg/rhttp/datatx/utils/download/download.go index 2c037addd0..724fbd1649 100644 --- a/pkg/rhttp/datatx/utils/download/download.go +++ b/pkg/rhttp/datatx/utils/download/download.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/rhttp/datatx/utils/download/range.go b/pkg/rhttp/datatx/utils/download/range.go index 987cb05548..063a67981d 100644 --- a/pkg/rhttp/datatx/utils/download/range.go +++ b/pkg/rhttp/datatx/utils/download/range.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/rhttp/global/global.go b/pkg/rhttp/global/global.go index 6404eab2f0..a3706abdf0 100644 --- a/pkg/rhttp/global/global.go +++ b/pkg/rhttp/global/global.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/rhttp/option.go b/pkg/rhttp/option.go index b195741c1c..632868dc0f 100644 --- a/pkg/rhttp/option.go +++ b/pkg/rhttp/option.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/rhttp/rhttp.go b/pkg/rhttp/rhttp.go index 4e9a76cb13..378a02dd39 100644 --- a/pkg/rhttp/rhttp.go +++ b/pkg/rhttp/rhttp.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/rhttp/router/router.go b/pkg/rhttp/router/router.go index fb1b91165e..e4bab68498 100644 --- a/pkg/rhttp/router/router.go +++ b/pkg/rhttp/router/router.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/sdk/action/action.go b/pkg/sdk/action/action.go index c84809738e..6776065d60 100644 --- a/pkg/sdk/action/action.go +++ b/pkg/sdk/action/action.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/sdk/action/download.go b/pkg/sdk/action/download.go index 18fd060ba0..109f2a33b4 100644 --- a/pkg/sdk/action/download.go +++ b/pkg/sdk/action/download.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/sdk/action/enumfiles.go b/pkg/sdk/action/enumfiles.go index 111cff4bcd..d98a5157c2 100644 --- a/pkg/sdk/action/enumfiles.go +++ b/pkg/sdk/action/enumfiles.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/sdk/action/fileops.go b/pkg/sdk/action/fileops.go index 601227b1fa..3f02b3a282 100644 --- a/pkg/sdk/action/fileops.go +++ b/pkg/sdk/action/fileops.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/sdk/action/upload.go b/pkg/sdk/action/upload.go index c89f86b5d5..10f1548714 100644 --- a/pkg/sdk/action/upload.go +++ b/pkg/sdk/action/upload.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/sdk/common/crypto/crypto.go b/pkg/sdk/common/crypto/crypto.go index 31d7d54e60..84ba0fdba4 100644 --- a/pkg/sdk/common/crypto/crypto.go +++ b/pkg/sdk/common/crypto/crypto.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/sdk/common/datadesc.go b/pkg/sdk/common/datadesc.go index 85262a33c1..0d4cccd196 100644 --- a/pkg/sdk/common/datadesc.go +++ b/pkg/sdk/common/datadesc.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/sdk/common/net/httpreq.go b/pkg/sdk/common/net/httpreq.go index 0edcda82c7..d6167abdbc 100644 --- a/pkg/sdk/common/net/httpreq.go +++ b/pkg/sdk/common/net/httpreq.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/sdk/common/net/net.go b/pkg/sdk/common/net/net.go index 2de9ac83b9..8c9c4d00c1 100644 --- a/pkg/sdk/common/net/net.go +++ b/pkg/sdk/common/net/net.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/sdk/common/net/rpc.go b/pkg/sdk/common/net/rpc.go index c8dcc35bee..91bad4ab12 100644 --- a/pkg/sdk/common/net/rpc.go +++ b/pkg/sdk/common/net/rpc.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/sdk/common/net/tus.go b/pkg/sdk/common/net/tus.go index 09d96e4892..794e5cbde2 100644 --- a/pkg/sdk/common/net/tus.go +++ b/pkg/sdk/common/net/tus.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this filePath except in compliance with the License. diff --git a/pkg/sdk/common/net/webdav.go b/pkg/sdk/common/net/webdav.go index 63cd2289ec..16d810e200 100644 --- a/pkg/sdk/common/net/webdav.go +++ b/pkg/sdk/common/net/webdav.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this filePath except in compliance with the License. diff --git a/pkg/sdk/common/opaque.go b/pkg/sdk/common/opaque.go index 7ce3ce7685..cf17979420 100644 --- a/pkg/sdk/common/opaque.go +++ b/pkg/sdk/common/opaque.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/sdk/common/util.go b/pkg/sdk/common/util.go index 478279dc93..35bd2de999 100644 --- a/pkg/sdk/common/util.go +++ b/pkg/sdk/common/util.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/sdk/session.go b/pkg/sdk/session.go index 5c6f1f3d56..6e451bd00c 100644 --- a/pkg/sdk/session.go +++ b/pkg/sdk/session.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/share/manager/json/json.go b/pkg/share/manager/json/json.go index 4aa6eed07b..856d8c9281 100644 --- a/pkg/share/manager/json/json.go +++ b/pkg/share/manager/json/json.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/share/manager/loader/loader.go b/pkg/share/manager/loader/loader.go index 58e33603eb..46f7a057c2 100644 --- a/pkg/share/manager/loader/loader.go +++ b/pkg/share/manager/loader/loader.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/share/manager/memory/memory.go b/pkg/share/manager/memory/memory.go index 8c70940066..a811e173aa 100644 --- a/pkg/share/manager/memory/memory.go +++ b/pkg/share/manager/memory/memory.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/share/manager/registry/registry.go b/pkg/share/manager/registry/registry.go index 596b565711..952fc7b8f2 100644 --- a/pkg/share/manager/registry/registry.go +++ b/pkg/share/manager/registry/registry.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/share/share.go b/pkg/share/share.go index a1d197dae8..b66bdf8969 100644 --- a/pkg/share/share.go +++ b/pkg/share/share.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/sharedconf/sharedconf.go b/pkg/sharedconf/sharedconf.go index 453f8137e5..0025b305c0 100644 --- a/pkg/sharedconf/sharedconf.go +++ b/pkg/sharedconf/sharedconf.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/sharedconf/sharedconf_test.go b/pkg/sharedconf/sharedconf_test.go index da077f5473..29749843bb 100644 --- a/pkg/sharedconf/sharedconf_test.go +++ b/pkg/sharedconf/sharedconf_test.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/smtpclient/smtpclient.go b/pkg/smtpclient/smtpclient.go index 4da59fe23e..b616307e32 100644 --- a/pkg/smtpclient/smtpclient.go +++ b/pkg/smtpclient/smtpclient.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/fs/eos/eos.go b/pkg/storage/fs/eos/eos.go index be20be9892..1be32bab77 100644 --- a/pkg/storage/fs/eos/eos.go +++ b/pkg/storage/fs/eos/eos.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/fs/eosgrpc/eosgrpc.go b/pkg/storage/fs/eosgrpc/eosgrpc.go index 0b8b030288..b47889bec6 100644 --- a/pkg/storage/fs/eosgrpc/eosgrpc.go +++ b/pkg/storage/fs/eosgrpc/eosgrpc.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/fs/eosgrpchome/eosgrpchome.go b/pkg/storage/fs/eosgrpchome/eosgrpchome.go index 79cc953b77..245fdfe5da 100644 --- a/pkg/storage/fs/eosgrpchome/eosgrpchome.go +++ b/pkg/storage/fs/eosgrpchome/eosgrpchome.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/fs/eoshome/eoshome.go b/pkg/storage/fs/eoshome/eoshome.go index 717d5ae3ad..69ab5b0f63 100644 --- a/pkg/storage/fs/eoshome/eoshome.go +++ b/pkg/storage/fs/eoshome/eoshome.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/fs/loader/loader.go b/pkg/storage/fs/loader/loader.go index 0077ee5c59..92b10ee31c 100644 --- a/pkg/storage/fs/loader/loader.go +++ b/pkg/storage/fs/loader/loader.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/fs/local/local.go b/pkg/storage/fs/local/local.go index 278101334a..0851abb7f7 100644 --- a/pkg/storage/fs/local/local.go +++ b/pkg/storage/fs/local/local.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/fs/localhome/localhome.go b/pkg/storage/fs/localhome/localhome.go index 5c17f67e75..c50b4faae7 100644 --- a/pkg/storage/fs/localhome/localhome.go +++ b/pkg/storage/fs/localhome/localhome.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/fs/ocis/grants.go b/pkg/storage/fs/ocis/grants.go index ae5f3f5364..db9d6f8e15 100644 --- a/pkg/storage/fs/ocis/grants.go +++ b/pkg/storage/fs/ocis/grants.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/fs/ocis/interfaces.go b/pkg/storage/fs/ocis/interfaces.go index b140aafc9a..48b2aaf177 100644 --- a/pkg/storage/fs/ocis/interfaces.go +++ b/pkg/storage/fs/ocis/interfaces.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/fs/ocis/lookup.go b/pkg/storage/fs/ocis/lookup.go index fdc1166e45..a7414f086f 100644 --- a/pkg/storage/fs/ocis/lookup.go +++ b/pkg/storage/fs/ocis/lookup.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/fs/ocis/metadata.go b/pkg/storage/fs/ocis/metadata.go index ff167a8b41..2fb2e879d3 100644 --- a/pkg/storage/fs/ocis/metadata.go +++ b/pkg/storage/fs/ocis/metadata.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -20,20 +20,37 @@ package ocis import ( "context" + "fmt" "path/filepath" + "strconv" + "strings" + "time" provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" "github.com/cs3org/reva/pkg/appctx" "github.com/cs3org/reva/pkg/errtypes" + "github.com/cs3org/reva/pkg/user" "github.com/pkg/errors" "github.com/pkg/xattr" ) +func parseMTime(v string) (t time.Time, err error) { + p := strings.SplitN(v, ".", 2) + var sec, nsec int64 + if sec, err = strconv.ParseInt(p[0], 10, 64); err == nil { + if len(p) > 1 { + nsec, err = strconv.ParseInt(p[1], 10, 64) + } + } + return time.Unix(sec, nsec), err +} + func (fs *ocisfs) SetArbitraryMetadata(ctx context.Context, ref *provider.Reference, md *provider.ArbitraryMetadata) (err error) { n, err := fs.lu.NodeFromResource(ctx, ref) if err != nil { return errors.Wrap(err, "ocisfs: error resolving ref") } + sublog := appctx.GetLogger(ctx).With().Interface("node", n).Logger() if !n.Exists { err = errtypes.NotFound(filepath.Join(n.ParentID, n.Name)) @@ -52,14 +69,67 @@ func (fs *ocisfs) SetArbitraryMetadata(ctx context.Context, ref *provider.Refere } nodePath := n.lu.toInternalPath(n.ID) + + errs := []error{} + // TODO should we really continue updating when an error occurs? + if md.Metadata != nil { + if val, ok := md.Metadata["mtime"]; ok { + delete(md.Metadata, "mtime") + err := n.SetMtime(ctx, val) + if err != nil { + errs = append(errs, errors.Wrap(err, "could not set mtime")) + } + } + // TODO(jfd) special handling for atime? + // TODO(jfd) allow setting birth time (btime)? + // TODO(jfd) any other metadata that is interesting? fileid? + // TODO unset when file is updated + // TODO unset when folder is updated or add timestamp to etag? + if val, ok := md.Metadata["etag"]; ok { + delete(md.Metadata, "etag") + err := n.SetEtag(ctx, val) + if err != nil { + errs = append(errs, errors.Wrap(err, "could not set etag")) + } + } + if val, ok := md.Metadata[_favoriteKey]; ok { + delete(md.Metadata, _favoriteKey) + if u, ok := user.ContextGetUser(ctx); ok { + if uid := u.GetId(); uid != nil { + if err := n.SetFavorite(uid, val); err != nil { + sublog.Error().Err(err). + Interface("user", u). + Msg("could not set favorite flag") + errs = append(errs, errors.Wrap(err, "could not set favorite flag")) + } + } else { + sublog.Error().Interface("user", u).Msg("user has no id") + errs = append(errs, errors.Wrap(errtypes.UserRequired("userrequired"), "user has no id")) + } + } else { + sublog.Error().Interface("user", u).Msg("error getting user from ctx") + errs = append(errs, errors.Wrap(errtypes.UserRequired("userrequired"), "error getting user from ctx")) + } + } + } for k, v := range md.Metadata { - // TODO set etag as temporary etag tmpEtagAttr attrName := metadataPrefix + k if err = xattr.Set(nodePath, attrName, []byte(v)); err != nil { - return errors.Wrap(err, "ocisfs: could not set metadata attribute "+attrName+" to "+k) + errs = append(errs, errors.Wrap(err, "ocisfs: could not set metadata attribute "+attrName+" to "+k)) } } - return + + switch len(errs) { + case 0: + return fs.tp.Propagate(ctx, n) + case 1: + // TODO Propagate if anything changed + return errs[0] + default: + // TODO Propagate if anything changed + // TODO how to return multiple errors? + return errors.New("multiple errors occurred, see log for details") + } } func (fs *ocisfs) UnsetArbitraryMetadata(ctx context.Context, ref *provider.Reference, keys []string) (err error) { @@ -67,6 +137,7 @@ func (fs *ocisfs) UnsetArbitraryMetadata(ctx context.Context, ref *provider.Refe if err != nil { return errors.Wrap(err, "ocisfs: error resolving ref") } + sublog := appctx.GetLogger(ctx).With().Interface("node", n).Logger() if !n.Exists { err = errtypes.NotFound(filepath.Join(n.ParentID, n.Name)) @@ -74,7 +145,7 @@ func (fs *ocisfs) UnsetArbitraryMetadata(ctx context.Context, ref *provider.Refe } ok, err := fs.p.HasPermission(ctx, n, func(rp *provider.ResourcePermissions) bool { - // TODO use SetArbitraryMetadata grant to CS3 api, tracked in https://github.com/cs3org/cs3apis/issues/91 + // TODO use SetArbitraryMetadata grant to CS3 api, tracked in https://github.com/cs3org/cs3apis/issues/91 return rp.InitiateFileUpload }) switch { @@ -85,22 +156,57 @@ func (fs *ocisfs) UnsetArbitraryMetadata(ctx context.Context, ref *provider.Refe } nodePath := n.lu.toInternalPath(n.ID) - for i := range keys { - attrName := metadataPrefix + keys[i] - if err = xattr.Remove(nodePath, attrName); err != nil { - // a non-existing attribute will return an error, which we can ignore - // (using string compare because the error type is syscall.Errno and not wrapped/recognizable) - if e, ok := err.(*xattr.Error); !ok || !(e.Err.Error() == "no data available" || - // darwin - e.Err.Error() == "attribute not found") { - appctx.GetLogger(ctx).Error().Err(err). - Interface("node", n). - Str("key", keys[i]). - Msg("could not unset metadata") + errs := []error{} + for _, k := range keys { + switch k { + case _favoriteKey: + if u, ok := user.ContextGetUser(ctx); ok { + // the favorite flag is specific to the user, so we need to incorporate the userid + if uid := u.GetId(); uid != nil { + fa := fmt.Sprintf("%s%s@%s", favPrefix, uid.GetOpaqueId(), uid.GetIdp()) + if err := xattr.Remove(nodePath, fa); err != nil { + sublog.Error().Err(err). + Interface("user", u). + Str("key", fa). + Msg("could not unset favorite flag") + errs = append(errs, errors.Wrap(err, "could not unset favorite flag")) + } + } else { + sublog.Error(). + Interface("user", u). + Msg("user has no id") + errs = append(errs, errors.Wrap(errtypes.UserRequired("userrequired"), "user has no id")) + } } else { - err = nil + sublog.Error(). + Interface("user", u). + Msg("error getting user from ctx") + errs = append(errs, errors.Wrap(errtypes.UserRequired("userrequired"), "error getting user from ctx")) + } + default: + if err = xattr.Remove(nodePath, metadataPrefix+k); err != nil { + // a non-existing attribute will return an error, which we can ignore + // (using string compare because the error type is syscall.Errno and not wrapped/recognizable) + if e, ok := err.(*xattr.Error); !ok || !(e.Err.Error() == "no data available" || + // darwin + e.Err.Error() == "attribute not found") { + sublog.Error().Err(err). + Str("key", k). + Msg("could not unset metadata") + errs = append(errs, errors.Wrap(err, "could not unset metadata")) + } } } } - return + switch len(errs) { + case 0: + return fs.tp.Propagate(ctx, n) + case 1: + // TODO Propagate if anything changed + return errs[0] + default: + // TODO Propagate if anything changed + // TODO how to return multiple errors? + return errors.New("multiple errors occurred, see log for details") + } } diff --git a/pkg/storage/fs/ocis/node.go b/pkg/storage/fs/ocis/node.go index 851597f12e..c2ab5537e7 100644 --- a/pkg/storage/fs/ocis/node.go +++ b/pkg/storage/fs/ocis/node.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -34,7 +34,6 @@ import ( "github.com/cs3org/reva/pkg/appctx" "github.com/cs3org/reva/pkg/errtypes" "github.com/cs3org/reva/pkg/mime" - "github.com/cs3org/reva/pkg/sdk/common" "github.com/cs3org/reva/pkg/storage/utils/ace" "github.com/cs3org/reva/pkg/user" "github.com/pkg/errors" @@ -45,6 +44,8 @@ import ( const ( _shareTypesKey = "http://owncloud.org/ns/share-types" _userShareType = "0" + + _favoriteKey = "http://owncloud.org/ns/favorite" ) // Node represents a node in the tree and provides methods to get a Parent or Child instance @@ -328,6 +329,97 @@ func (n *Node) PermissionSet(ctx context.Context) *provider.ResourcePermissions return noPermissions } +// calculateEtag returns a hash of fileid + tmtime (or mtime) +func calculateEtag(nodeID string, tmTime time.Time) (string, error) { + h := md5.New() + if _, err := io.WriteString(h, nodeID); err != nil { + return "", err + } + if tb, err := tmTime.UTC().MarshalBinary(); err == nil { + if _, err := h.Write(tb); err != nil { + return "", err + } + } else { + return "", err + } + return fmt.Sprintf(`"%x"`, h.Sum(nil)), nil +} + +// SetMtime sets the mtime and atime of a node +func (n *Node) SetMtime(ctx context.Context, mtime string) error { + sublog := appctx.GetLogger(ctx).With().Interface("node", n).Logger() + if mt, err := parseMTime(mtime); err == nil { + nodePath := n.lu.toInternalPath(n.ID) + // updating mtime also updates atime + if err := os.Chtimes(nodePath, mt, mt); err != nil { + sublog.Error().Err(err). + Time("mtime", mt). + Msg("could not set mtime") + return errors.Wrap(err, "could not set mtime") + } + } else { + sublog.Error().Err(err). + Str("mtime", mtime). + Msg("could not parse mtime") + return errors.Wrap(err, "could not parse mtime") + } + return nil +} + +// SetEtag sets the temporary etag of a node if it differs from the current etag +func (n *Node) SetEtag(ctx context.Context, val string) (err error) { + sublog := appctx.GetLogger(ctx).With().Interface("node", n).Logger() + nodePath := n.lu.toInternalPath(n.ID) + var tmTime time.Time + if tmTime, err = n.GetTMTime(); err != nil { + // no tmtime, use mtime + var fi os.FileInfo + if fi, err = os.Lstat(nodePath); err != nil { + return + } + tmTime = fi.ModTime() + } + var etag string + if etag, err = calculateEtag(n.ID, tmTime); err != nil { + return + } + + // sanitize etag + val = fmt.Sprintf("\"%s\"", strings.Trim(val, "\"")) + if etag == val { + sublog.Debug(). + Str("etag", val). + Msg("ignoring request to update identical etag") + return nil + } + // etag is only valid until the calculated etag changes, is part of propagation + return xattr.Set(nodePath, tmpEtagAttr, []byte(val)) +} + +// SetFavorite sets the favorite for the current user +// TODO we should not mess with the user here ... the favorites is now a user specific property for a file +// that cannot be mapped to extended attributes without leaking who has marked a file as a favorite +// it is a specific case of a tag, which is user individual as well +// TODO there are different types of tags +// 1. public that are managed by everyone +// 2. private tags that are only visible to the user +// 3. system tags that are only visible to the system +// 4. group tags that are only visible to a group ... +// urgh ... well this can be solved using different namespaces +// 1. public = p: +// 2. private = u:: for user specific +// 3. system = s: for system +// 4. group = g:: +// 5. app? = a:: for apps? +// obviously this only is secure when the u/s/g/a namespaces are not accessible by users in the filesystem +// public tags can be mapped to extended attributes +func (n *Node) SetFavorite(uid *userpb.UserId, val string) error { + nodePath := n.lu.toInternalPath(n.ID) + // the favorite flag is specific to the user, so we need to incorporate the userid + fa := fmt.Sprintf("%s%s@%s", favPrefix, uid.GetOpaqueId(), uid.GetIdp()) + return xattr.Set(nodePath, fa, []byte(val)) +} + // AsResourceInfo return the node as CS3 ResourceInfo func (n *Node) AsResourceInfo(ctx context.Context, rp *provider.ResourcePermissions, mdKeys []string) (ri *provider.ResourceInfo, err error) { sublog := appctx.GetLogger(ctx).With().Interface("node", n).Logger() @@ -379,31 +471,19 @@ func (n *Node) AsResourceInfo(ctx context.Context, rp *provider.ResourcePermissi sublog.Debug().Err(err).Msg("could not determine owner") } - // etag currently is a hash of fileid + tmtime (or mtime) // TODO make etag of files use fileid and checksum - // TODO implment adding temporery etag in an attribute to restore backups - h := md5.New() - if _, err := io.WriteString(h, n.ID); err != nil { - return nil, err - } + var tmTime time.Time if tmTime, err = n.GetTMTime(); err != nil { // no tmtime, use mtime tmTime = fi.ModTime() } - if tb, err := tmTime.UTC().MarshalBinary(); err == nil { - if _, err := h.Write(tb); err != nil { - return nil, err - } - } else { - return nil, err - } // use temporary etag if it is set if b, err := xattr.Get(nodePath, tmpEtagAttr); err == nil { ri.Etag = fmt.Sprintf(`"%x"`, string(b)) - } else { - ri.Etag = fmt.Sprintf(`"%x"`, h.Sum(nil)) + } else if ri.Etag, err = calculateEtag(n.ID, tmTime); err != nil { + sublog.Debug().Err(err).Msg("could not calculate etag") } // mtime uses tmtime if present @@ -414,30 +494,74 @@ func (n *Node) AsResourceInfo(ctx context.Context, rp *provider.ResourcePermissi Nanos: uint32(un % 1000000000), } - // TODO only read the requested metadata attributes - if attrs, err := xattr.List(nodePath); err == nil { - ri.ArbitraryMetadata = &provider.ArbitraryMetadata{ - Metadata: map[string]string{}, - } - for i := range attrs { - if strings.HasPrefix(attrs[i], metadataPrefix) { - k := strings.TrimPrefix(attrs[i], metadataPrefix) - if v, err := xattr.Get(nodePath, attrs[i]); err == nil { - ri.ArbitraryMetadata.Metadata[k] = string(v) - } else { - sublog.Error().Err(err).Str("attr", attrs[i]).Msg("could not get attribute value") + mdKeysMap := make(map[string]struct{}) + for _, k := range mdKeys { + mdKeysMap[k] = struct{}{} + } + + var returnAllKeys bool + if _, ok := mdKeysMap["*"]; len(mdKeys) == 0 || ok { + returnAllKeys = true + } + + metadata := map[string]string{} + + // read favorite flag for the current user + if _, ok := mdKeysMap[_favoriteKey]; returnAllKeys || ok { + favorite := "" + if u, ok := user.ContextGetUser(ctx); ok { + // the favorite flag is specific to the user, so we need to incorporate the userid + if uid := u.GetId(); uid != nil { + fa := fmt.Sprintf("%s%s@%s", favPrefix, uid.GetOpaqueId(), uid.GetIdp()) + if val, err := xattr.Get(nodePath, fa); err == nil { + sublog.Debug(). + Str("favorite", fa). + Msg("found favorite flag") + favorite = string(val) } + } else { + sublog.Error().Err(errtypes.UserRequired("userrequired")).Msg("user has no id") } + } else { + sublog.Error().Err(errtypes.UserRequired("userrequired")).Msg("error getting user from ctx") } - } else { - sublog.Error().Err(err).Msg("could not list attributes") + metadata[_favoriteKey] = favorite } - if common.FindString(mdKeys, _shareTypesKey) != -1 { + // share indicator + if _, ok := mdKeysMap[_shareTypesKey]; returnAllKeys || ok { if n.hasUserShares(ctx) { - ri.ArbitraryMetadata.Metadata[_shareTypesKey] = _userShareType + metadata[_shareTypesKey] = _userShareType + } + } + + // only read the requested metadata attributes + list, err := xattr.List(nodePath) + if err != nil { + sublog.Error().Err(err).Msg("error getting list of extended attributes") + } else { + for _, entry := range list { + // filter out non-custom properties + if !strings.HasPrefix(entry, metadataPrefix) { + continue + } + // only read when key was requested + k := entry[len(metadataPrefix):] + if _, ok := mdKeysMap[k]; returnAllKeys || ok { + if val, err := xattr.Get(nodePath, entry); err == nil { + metadata[k] = string(val) + } else { + sublog.Error().Err(err). + Str("entry", entry). + Msg("error retrieving xattr metadata") + } + } + } } + ri.ArbitraryMetadata = &provider.ArbitraryMetadata{ + Metadata: metadata, + } sublog.Debug(). Interface("ri", ri). diff --git a/pkg/storage/fs/ocis/ocis.go b/pkg/storage/fs/ocis/ocis.go index 1c3e211511..0d17aebf66 100644 --- a/pkg/storage/fs/ocis/ocis.go +++ b/pkg/storage/fs/ocis/ocis.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -62,8 +62,9 @@ const ( // grantPrefix is the prefix for sharing related extended attributes grantPrefix string = ocisPrefix + "grant." metadataPrefix string = ocisPrefix + "md." - // TODO implement favorites metadata flag - //favPrefix string = ocisPrefix + "fav." // favorite flag, per user + + // favorite flag, per user + favPrefix string = ocisPrefix + "fav." // a temporary etag for a folder that is removed when the mtime propagation happens tmpEtagAttr string = ocisPrefix + "tmp.etag" diff --git a/pkg/storage/fs/ocis/option.go b/pkg/storage/fs/ocis/option.go index 3e24d442e4..48a09308ea 100644 --- a/pkg/storage/fs/ocis/option.go +++ b/pkg/storage/fs/ocis/option.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/fs/ocis/permissions.go b/pkg/storage/fs/ocis/permissions.go index 2b77fb93fa..55077a3cc5 100644 --- a/pkg/storage/fs/ocis/permissions.go +++ b/pkg/storage/fs/ocis/permissions.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/fs/ocis/recycle.go b/pkg/storage/fs/ocis/recycle.go index 577298cf08..108186e43e 100644 --- a/pkg/storage/fs/ocis/recycle.go +++ b/pkg/storage/fs/ocis/recycle.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/fs/ocis/revisions.go b/pkg/storage/fs/ocis/revisions.go index 898cd5c348..526275bf92 100644 --- a/pkg/storage/fs/ocis/revisions.go +++ b/pkg/storage/fs/ocis/revisions.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/fs/ocis/tree.go b/pkg/storage/fs/ocis/tree.go index 7024a6448f..44d27f9d76 100644 --- a/pkg/storage/fs/ocis/tree.go +++ b/pkg/storage/fs/ocis/tree.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/fs/ocis/upload.go b/pkg/storage/fs/ocis/upload.go index f531275cdf..d79093ab0a 100644 --- a/pkg/storage/fs/ocis/upload.go +++ b/pkg/storage/fs/ocis/upload.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/fs/owncloud/owncloud.go b/pkg/storage/fs/owncloud/owncloud.go index 15f0aff408..c82cdee5bc 100644 --- a/pkg/storage/fs/owncloud/owncloud.go +++ b/pkg/storage/fs/owncloud/owncloud.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/fs/owncloud/owncloud_unix.go b/pkg/storage/fs/owncloud/owncloud_unix.go index 5530c453e7..2f058eb276 100755 --- a/pkg/storage/fs/owncloud/owncloud_unix.go +++ b/pkg/storage/fs/owncloud/owncloud_unix.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/fs/owncloud/owncloud_windows.go b/pkg/storage/fs/owncloud/owncloud_windows.go index e041b6d028..1ad8d3f2df 100644 --- a/pkg/storage/fs/owncloud/owncloud_windows.go +++ b/pkg/storage/fs/owncloud/owncloud_windows.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/fs/owncloud/upload.go b/pkg/storage/fs/owncloud/upload.go index ea85322721..0ebbdb5ab9 100644 --- a/pkg/storage/fs/owncloud/upload.go +++ b/pkg/storage/fs/owncloud/upload.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/fs/registry/registry.go b/pkg/storage/fs/registry/registry.go index b5e44540bb..b6eab9d52c 100644 --- a/pkg/storage/fs/registry/registry.go +++ b/pkg/storage/fs/registry/registry.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/fs/s3/s3.go b/pkg/storage/fs/s3/s3.go index 078a9efea2..356aba8447 100644 --- a/pkg/storage/fs/s3/s3.go +++ b/pkg/storage/fs/s3/s3.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/fs/s3/upload.go b/pkg/storage/fs/s3/upload.go index 52c68186c2..aa63eead0f 100644 --- a/pkg/storage/fs/s3/upload.go +++ b/pkg/storage/fs/s3/upload.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/migrate/metadata.go b/pkg/storage/migrate/metadata.go index a5216c29be..571b16cd6b 100644 --- a/pkg/storage/migrate/metadata.go +++ b/pkg/storage/migrate/metadata.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/migrate/shares.go b/pkg/storage/migrate/shares.go index 2e60617f7c..64cbb3a6a0 100644 --- a/pkg/storage/migrate/shares.go +++ b/pkg/storage/migrate/shares.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/registry/loader/loader.go b/pkg/storage/registry/loader/loader.go index 3e87500031..0921739a78 100644 --- a/pkg/storage/registry/loader/loader.go +++ b/pkg/storage/registry/loader/loader.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/registry/registry/registry.go b/pkg/storage/registry/registry/registry.go index 71dacac4ae..4ee886751b 100644 --- a/pkg/storage/registry/registry/registry.go +++ b/pkg/storage/registry/registry/registry.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/registry/static/static.go b/pkg/storage/registry/static/static.go index 5777d32952..0916b2e1aa 100644 --- a/pkg/storage/registry/static/static.go +++ b/pkg/storage/registry/static/static.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/storage.go b/pkg/storage/storage.go index 29bff95664..0ed8cf8f53 100644 --- a/pkg/storage/storage.go +++ b/pkg/storage/storage.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/utils/ace/ace.go b/pkg/storage/utils/ace/ace.go index faf614082e..4098ce94c0 100644 --- a/pkg/storage/utils/ace/ace.go +++ b/pkg/storage/utils/ace/ace.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/utils/acl/acl.go b/pkg/storage/utils/acl/acl.go index 0c244f4273..ed0459e5de 100644 --- a/pkg/storage/utils/acl/acl.go +++ b/pkg/storage/utils/acl/acl.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/utils/chunking/chunking.go b/pkg/storage/utils/chunking/chunking.go index 57508a376e..e912169305 100644 --- a/pkg/storage/utils/chunking/chunking.go +++ b/pkg/storage/utils/chunking/chunking.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/utils/eosfs/config.go b/pkg/storage/utils/eosfs/config.go index f06e35cf25..7b867403d6 100644 --- a/pkg/storage/utils/eosfs/config.go +++ b/pkg/storage/utils/eosfs/config.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/utils/eosfs/eosfs.go b/pkg/storage/utils/eosfs/eosfs.go index f83ea47b0a..5dbcddaac1 100644 --- a/pkg/storage/utils/eosfs/eosfs.go +++ b/pkg/storage/utils/eosfs/eosfs.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/utils/eosfs/upload.go b/pkg/storage/utils/eosfs/upload.go index 999eb3d33f..74b3f923ec 100644 --- a/pkg/storage/utils/eosfs/upload.go +++ b/pkg/storage/utils/eosfs/upload.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/utils/etag/etag.go b/pkg/storage/utils/etag/etag.go index 22ecfa760c..190bbd1521 100644 --- a/pkg/storage/utils/etag/etag.go +++ b/pkg/storage/utils/etag/etag.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/utils/grants/grants.go b/pkg/storage/utils/grants/grants.go index eadc80e7c5..b3d6ca9ff5 100644 --- a/pkg/storage/utils/grants/grants.go +++ b/pkg/storage/utils/grants/grants.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/utils/localfs/db.go b/pkg/storage/utils/localfs/db.go index a8d2335d59..15b0b6ff2f 100644 --- a/pkg/storage/utils/localfs/db.go +++ b/pkg/storage/utils/localfs/db.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/utils/localfs/localfs.go b/pkg/storage/utils/localfs/localfs.go index ee7d5ffd4e..ff03a362ef 100644 --- a/pkg/storage/utils/localfs/localfs.go +++ b/pkg/storage/utils/localfs/localfs.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/utils/localfs/localfs_unix.go b/pkg/storage/utils/localfs/localfs_unix.go index 3ec0889338..5cac1b7e59 100644 --- a/pkg/storage/utils/localfs/localfs_unix.go +++ b/pkg/storage/utils/localfs/localfs_unix.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/utils/localfs/localfs_windows.go b/pkg/storage/utils/localfs/localfs_windows.go index 1308d9390c..31a7590199 100644 --- a/pkg/storage/utils/localfs/localfs_windows.go +++ b/pkg/storage/utils/localfs/localfs_windows.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/utils/localfs/upload.go b/pkg/storage/utils/localfs/upload.go index 5699d95a45..95905d2f0f 100644 --- a/pkg/storage/utils/localfs/upload.go +++ b/pkg/storage/utils/localfs/upload.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/utils/templates/templates.go b/pkg/storage/utils/templates/templates.go index 6d47a2f962..2741073cc6 100644 --- a/pkg/storage/utils/templates/templates.go +++ b/pkg/storage/utils/templates/templates.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/storage/utils/templates/templates_test.go b/pkg/storage/utils/templates/templates_test.go index 1b02fbfaf7..aa5cea452f 100644 --- a/pkg/storage/utils/templates/templates_test.go +++ b/pkg/storage/utils/templates/templates_test.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/sysinfo/metrics.go b/pkg/sysinfo/metrics.go index 6b7b443a9e..2dced38f56 100644 --- a/pkg/sysinfo/metrics.go +++ b/pkg/sysinfo/metrics.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/sysinfo/reva.go b/pkg/sysinfo/reva.go index 6438e85cc8..4bd6eb8c02 100644 --- a/pkg/sysinfo/reva.go +++ b/pkg/sysinfo/reva.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/sysinfo/sysinfo.go b/pkg/sysinfo/sysinfo.go index da4f89075a..fc19764e20 100644 --- a/pkg/sysinfo/sysinfo.go +++ b/pkg/sysinfo/sysinfo.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/token/manager/demo/demo.go b/pkg/token/manager/demo/demo.go index 52e18dea88..08ae96312c 100644 --- a/pkg/token/manager/demo/demo.go +++ b/pkg/token/manager/demo/demo.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/token/manager/demo/demo_test.go b/pkg/token/manager/demo/demo_test.go index 6eba0a7b5d..684be5887b 100644 --- a/pkg/token/manager/demo/demo_test.go +++ b/pkg/token/manager/demo/demo_test.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/token/manager/jwt/jwt.go b/pkg/token/manager/jwt/jwt.go index 2a48fef2b6..7ff7a72abf 100644 --- a/pkg/token/manager/jwt/jwt.go +++ b/pkg/token/manager/jwt/jwt.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/token/manager/loader/loader.go b/pkg/token/manager/loader/loader.go index 364fc18be2..c6c345af33 100644 --- a/pkg/token/manager/loader/loader.go +++ b/pkg/token/manager/loader/loader.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/token/manager/registry/registry.go b/pkg/token/manager/registry/registry.go index 76ef26d362..c6fbf39d1d 100644 --- a/pkg/token/manager/registry/registry.go +++ b/pkg/token/manager/registry/registry.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/token/token.go b/pkg/token/token.go index 96fa34976c..0d1c14f455 100644 --- a/pkg/token/token.go +++ b/pkg/token/token.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/ttlmap/ttlmap.go b/pkg/ttlmap/ttlmap.go index a559a37ea4..1867492cd0 100644 --- a/pkg/ttlmap/ttlmap.go +++ b/pkg/ttlmap/ttlmap.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/user/manager/demo/demo.go b/pkg/user/manager/demo/demo.go index 9ef648e6e1..50cd312fed 100644 --- a/pkg/user/manager/demo/demo.go +++ b/pkg/user/manager/demo/demo.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/user/manager/demo/demo_test.go b/pkg/user/manager/demo/demo_test.go index 82966dcc3c..f4585540ea 100644 --- a/pkg/user/manager/demo/demo_test.go +++ b/pkg/user/manager/demo/demo_test.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/user/manager/json/json.go b/pkg/user/manager/json/json.go index 5a972127aa..456377e9be 100644 --- a/pkg/user/manager/json/json.go +++ b/pkg/user/manager/json/json.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/user/manager/json/json_test.go b/pkg/user/manager/json/json_test.go index 0c59592fea..e2586d7b17 100644 --- a/pkg/user/manager/json/json_test.go +++ b/pkg/user/manager/json/json_test.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/user/manager/ldap/ldap.go b/pkg/user/manager/ldap/ldap.go index 9e41e3d67d..a79be29afb 100644 --- a/pkg/user/manager/ldap/ldap.go +++ b/pkg/user/manager/ldap/ldap.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/user/manager/ldap/ldap_test.go b/pkg/user/manager/ldap/ldap_test.go index d72e6ec7fd..4d6a123568 100644 --- a/pkg/user/manager/ldap/ldap_test.go +++ b/pkg/user/manager/ldap/ldap_test.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/user/manager/loader/loader.go b/pkg/user/manager/loader/loader.go index b065010602..c935085bcb 100644 --- a/pkg/user/manager/loader/loader.go +++ b/pkg/user/manager/loader/loader.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/user/manager/registry/registry.go b/pkg/user/manager/registry/registry.go index 7911230202..f9f2477a41 100644 --- a/pkg/user/manager/registry/registry.go +++ b/pkg/user/manager/registry/registry.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/user/user.go b/pkg/user/user.go index 5c592dff85..bf6e1974ec 100644 --- a/pkg/user/user.go +++ b/pkg/user/user.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 428725e077..0b6c989a8c 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/utils/utils_test.go b/pkg/utils/utils_test.go index b3ef0435e3..176272a523 100644 --- a/pkg/utils/utils_test.go +++ b/pkg/utils/utils_test.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tests/acceptance/expected-failures-on-OCIS-storage.txt b/tests/acceptance/expected-failures-on-OCIS-storage.txt index 78a23b2fa5..1af68d981b 100644 --- a/tests/acceptance/expected-failures-on-OCIS-storage.txt +++ b/tests/acceptance/expected-failures-on-OCIS-storage.txt @@ -115,6 +115,7 @@ apiAuthWebDav/webDavPUTAuth.feature:38 apiCapabilities/capabilitiesWithNormalUser.feature:11 # # https://github.com/owncloud/ocis-reva/issues/39 REPORT request not implemented +# https://github.com/cs3org/reva/issues/1394 ocis needs an api to list all files of a user he marked as favorite or that are tagged with a certain tag # And other missing implementation of favorites # apiFavorites/favorites.feature:91 @@ -498,10 +499,12 @@ apiSharePublicLink2/copyFromPublicLink.feature:182 apiSharePublicLink2/copyFromPublicLink.feature:183 apiSharePublicLink2/updatePublicLinkShare.feature:44 apiSharePublicLink2/updatePublicLinkShare.feature:45 -apiSharePublicLink2/updatePublicLinkShare.feature:93 -apiSharePublicLink2/updatePublicLinkShare.feature:94 -apiSharePublicLink2/updatePublicLinkShare.feature:284 -apiSharePublicLink2/updatePublicLinkShare.feature:285 +apiSharePublicLink2/updatePublicLinkShare.feature:114 +apiSharePublicLink2/updatePublicLinkShare.feature:115 +apiSharePublicLink2/updatePublicLinkShare.feature:130 +apiSharePublicLink2/updatePublicLinkShare.feature:131 +apiSharePublicLink2/updatePublicLinkShare.feature:321 +apiSharePublicLink2/updatePublicLinkShare.feature:322 # # https://github.com/owncloud/product/issues/270 [OCIS] share permissions not enforced # @@ -525,27 +528,27 @@ apiSharePublicLink2/reShareAsPublicLinkToSharesOldDav.feature:115 # # https://github.com/owncloud/ocis-reva/issues/11 listing received shares does not work # -apiSharePublicLink2/updatePublicLinkShare.feature:303 -apiSharePublicLink2/updatePublicLinkShare.feature:304 -apiSharePublicLink2/updatePublicLinkShare.feature:322 -apiSharePublicLink2/updatePublicLinkShare.feature:323 +apiSharePublicLink2/updatePublicLinkShare.feature:340 apiSharePublicLink2/updatePublicLinkShare.feature:341 -apiSharePublicLink2/updatePublicLinkShare.feature:342 +apiSharePublicLink2/updatePublicLinkShare.feature:359 apiSharePublicLink2/updatePublicLinkShare.feature:360 -apiSharePublicLink2/updatePublicLinkShare.feature:361 +apiSharePublicLink2/updatePublicLinkShare.feature:378 apiSharePublicLink2/updatePublicLinkShare.feature:379 -apiSharePublicLink2/updatePublicLinkShare.feature:380 +apiSharePublicLink2/updatePublicLinkShare.feature:397 apiSharePublicLink2/updatePublicLinkShare.feature:398 -apiSharePublicLink2/updatePublicLinkShare.feature:399 +apiSharePublicLink2/updatePublicLinkShare.feature:416 apiSharePublicLink2/updatePublicLinkShare.feature:417 -apiSharePublicLink2/updatePublicLinkShare.feature:418 -apiSharePublicLink2/updatePublicLinkShare.feature:439 -apiSharePublicLink2/updatePublicLinkShare.feature:440 +apiSharePublicLink2/updatePublicLinkShare.feature:435 +apiSharePublicLink2/updatePublicLinkShare.feature:436 +apiSharePublicLink2/updatePublicLinkShare.feature:454 +apiSharePublicLink2/updatePublicLinkShare.feature:455 +apiSharePublicLink2/updatePublicLinkShare.feature:476 +apiSharePublicLink2/updatePublicLinkShare.feature:477 # # https://github.com/owncloud/ocis-reva/issues/292 Public link enforce permissions # -apiSharePublicLink2/updatePublicLinkShare.feature:486 -apiSharePublicLink2/updatePublicLinkShare.feature:487 +apiSharePublicLink2/updatePublicLinkShare.feature:523 +apiSharePublicLink2/updatePublicLinkShare.feature:524 apiSharePublicLink2/uploadToPublicLinkShare.feature:9 apiSharePublicLink2/uploadToPublicLinkShare.feature:83 apiSharePublicLink2/uploadToPublicLinkShare.feature:103 @@ -1087,8 +1090,6 @@ apiWebdavProperties2/getFileProperties.feature:71 # # https://github.com/owncloud/ocis/issues/567 cannot get share-types webdav property # -apiWebdavProperties2/getFileProperties.feature:135 -apiWebdavProperties2/getFileProperties.feature:136 apiWebdavProperties2/getFileProperties.feature:174 apiWebdavProperties2/getFileProperties.feature:175 # diff --git a/tests/acceptance/expected-failures-on-OWNCLOUD-storage.txt b/tests/acceptance/expected-failures-on-OWNCLOUD-storage.txt index 9173ef7b2c..5e882984ae 100644 --- a/tests/acceptance/expected-failures-on-OWNCLOUD-storage.txt +++ b/tests/acceptance/expected-failures-on-OWNCLOUD-storage.txt @@ -115,6 +115,7 @@ apiAuthWebDav/webDavPUTAuth.feature:38 apiCapabilities/capabilitiesWithNormalUser.feature:11 # # https://github.com/owncloud/ocis-reva/issues/39 REPORT request not implemented +# https://github.com/cs3org/reva/issues/1394 ocis needs an api to list all files of a user he marked as favorite or that are tagged with a certain tag # And other missing implementation of favorites # apiFavorites/favorites.feature:91 @@ -470,10 +471,12 @@ apiSharePublicLink2/copyFromPublicLink.feature:182 apiSharePublicLink2/copyFromPublicLink.feature:183 apiSharePublicLink2/updatePublicLinkShare.feature:44 apiSharePublicLink2/updatePublicLinkShare.feature:45 -apiSharePublicLink2/updatePublicLinkShare.feature:93 -apiSharePublicLink2/updatePublicLinkShare.feature:94 -apiSharePublicLink2/updatePublicLinkShare.feature:284 -apiSharePublicLink2/updatePublicLinkShare.feature:285 +apiSharePublicLink2/updatePublicLinkShare.feature:114 +apiSharePublicLink2/updatePublicLinkShare.feature:115 +apiSharePublicLink2/updatePublicLinkShare.feature:130 +apiSharePublicLink2/updatePublicLinkShare.feature:131 +apiSharePublicLink2/updatePublicLinkShare.feature:321 +apiSharePublicLink2/updatePublicLinkShare.feature:322 # # https://github.com/owncloud/product/issues/270 [OCIS] share permissions not enforced # @@ -506,27 +509,27 @@ apiSharePublicLink2/reShareAsPublicLinkToSharesOldDav.feature:115 # https://github.com/owncloud/ocis-reva/issues/11 listing received shares does not work # apiShareManagementBasicToShares/createShareToSharesFolder.feature:367 -apiSharePublicLink2/updatePublicLinkShare.feature:303 -apiSharePublicLink2/updatePublicLinkShare.feature:304 -apiSharePublicLink2/updatePublicLinkShare.feature:322 -apiSharePublicLink2/updatePublicLinkShare.feature:323 +apiSharePublicLink2/updatePublicLinkShare.feature:340 apiSharePublicLink2/updatePublicLinkShare.feature:341 -apiSharePublicLink2/updatePublicLinkShare.feature:342 +apiSharePublicLink2/updatePublicLinkShare.feature:359 apiSharePublicLink2/updatePublicLinkShare.feature:360 -apiSharePublicLink2/updatePublicLinkShare.feature:361 +apiSharePublicLink2/updatePublicLinkShare.feature:378 apiSharePublicLink2/updatePublicLinkShare.feature:379 -apiSharePublicLink2/updatePublicLinkShare.feature:380 +apiSharePublicLink2/updatePublicLinkShare.feature:397 apiSharePublicLink2/updatePublicLinkShare.feature:398 -apiSharePublicLink2/updatePublicLinkShare.feature:399 +apiSharePublicLink2/updatePublicLinkShare.feature:416 apiSharePublicLink2/updatePublicLinkShare.feature:417 -apiSharePublicLink2/updatePublicLinkShare.feature:418 -apiSharePublicLink2/updatePublicLinkShare.feature:439 -apiSharePublicLink2/updatePublicLinkShare.feature:440 +apiSharePublicLink2/updatePublicLinkShare.feature:435 +apiSharePublicLink2/updatePublicLinkShare.feature:436 +apiSharePublicLink2/updatePublicLinkShare.feature:454 +apiSharePublicLink2/updatePublicLinkShare.feature:455 +apiSharePublicLink2/updatePublicLinkShare.feature:476 +apiSharePublicLink2/updatePublicLinkShare.feature:477 # # https://github.com/owncloud/ocis-reva/issues/292 Public link enforce permissions # -apiSharePublicLink2/updatePublicLinkShare.feature:486 -apiSharePublicLink2/updatePublicLinkShare.feature:487 +apiSharePublicLink2/updatePublicLinkShare.feature:523 +apiSharePublicLink2/updatePublicLinkShare.feature:524 apiSharePublicLink2/uploadToPublicLinkShare.feature:9 apiSharePublicLink2/uploadToPublicLinkShare.feature:83 apiSharePublicLink2/uploadToPublicLinkShare.feature:103 diff --git a/tools/check-changelog/main.go b/tools/check-changelog/main.go index 2accea1ae1..d242e433eb 100644 --- a/tools/check-changelog/main.go +++ b/tools/check-changelog/main.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tools/check-license/check-license.go b/tools/check-license/check-license.go index c38695e80c..6e8807d5bc 100644 --- a/tools/check-license/check-license.go +++ b/tools/check-license/check-license.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -30,7 +30,7 @@ import ( var fix = flag.Bool("fix", false, "add header if not present") -var licenseText = `// Copyright 2018-2020 CERN +var licenseText = `// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tools/create-artifacts/main.go b/tools/create-artifacts/main.go index 8a9b532392..79067c1771 100644 --- a/tools/create-artifacts/main.go +++ b/tools/create-artifacts/main.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tools/generate-documentation/main.go b/tools/generate-documentation/main.go index d6902fc099..42e7961dc8 100644 --- a/tools/generate-documentation/main.go +++ b/tools/generate-documentation/main.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/tools/prepare-release/main.go b/tools/prepare-release/main.go index dae2d4f80d..1e5d7d2233 100644 --- a/tools/prepare-release/main.go +++ b/tools/prepare-release/main.go @@ -1,4 +1,4 @@ -// Copyright 2018-2020 CERN +// Copyright 2018-2021 CERN // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License.