:boom: To see the trace, please open the link in the console ...
\\n\\n\\n\\n" >> comments.file',
'for f in *.zip; do echo "#### npx playwright show-trace $CACHE_ENDPOINT/$CACHE_BUCKET/${DRONE_BUILD_NUMBER}/tracing/$f \n" >> comments.file; done',
'echo "\n
" >> comments.file',
@@ -993,42 +969,43 @@ def settingsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
"os": "linux",
"arch": "amd64",
},
- "steps": skipIfUnchanged(ctx, "acceptance-tests") + restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin") +
- ocisServer(storage, accounts_hash_difficulty) + waitForSeleniumService() + waitForMiddlewareService() + [
- {
- "name": "WebUIAcceptanceTests",
- "image": OC_CI_NODEJS % DEFAULT_NODEJS_VERSION,
- "environment": {
- "SERVER_HOST": "https://ocis-server:9200",
- "BACKEND_HOST": "https://ocis-server:9200",
- "RUN_ON_OCIS": "true",
- "OCIS_REVA_DATA_ROOT": "/srv/app/tmp/ocis/owncloud/data",
- "WEB_UI_CONFIG": "/drone/src/tests/config/drone/ocis-config.json",
- "TEST_TAGS": "not @skipOnOCIS and not @skip",
- "LOCAL_UPLOAD_DIR": "/uploads",
- "NODE_TLS_REJECT_UNAUTHORIZED": 0,
- "WEB_PATH": "/srv/app/web",
- "FEATURE_PATH": "/drone/src/services/settings/ui/tests/acceptance/features",
- "MIDDLEWARE_HOST": "http://middleware:3000",
- },
- "commands": [
- ". /drone/src/.drone.env",
- # we need to have Web around for some general step definitions (eg. how to log in)
- "git clone -b $WEB_BRANCH --single-branch --no-tags https://github.com/owncloud/web.git /srv/app/web",
- "cd /srv/app/web",
- "git checkout $WEB_COMMITID",
- # TODO: settings/package.json has all the acceptance test dependencies
- # they shouldn't be needed since we could also use them from web:/tests/acceptance/package.json
- "cd /drone/src/services/settings",
- "retry -t 3 'yarn install --immutable'",
- "make test-acceptance-webui",
- ],
- "volumes": [{
- "name": "uploads",
- "path": "/uploads",
- }],
- },
- ] + failEarly(ctx, early_fail),
+ "steps": skipIfUnchanged(ctx, "acceptance-tests") +
+ restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin") +
+ ocisServer(storage, accounts_hash_difficulty) +
+ waitForSeleniumService() +
+ waitForMiddlewareService() +
+ restoreWebCache() +
+ restoreWebAcceptanceYarnCache() +
+ [
+ {
+ "name": "WebUIAcceptanceTests",
+ "image": OC_CI_NODEJS % DEFAULT_NODEJS_VERSION,
+ "environment": {
+ "SERVER_HOST": "https://ocis-server:9200",
+ "BACKEND_HOST": "https://ocis-server:9200",
+ "RUN_ON_OCIS": "true",
+ "OCIS_REVA_DATA_ROOT": "/srv/app/tmp/ocis/owncloud/data",
+ "WEB_UI_CONFIG": "%s/tests/config/drone/ocis-config.json" % dirs["base"],
+ "TEST_TAGS": "not @skipOnOCIS and not @skip",
+ "LOCAL_UPLOAD_DIR": "/uploads",
+ "NODE_TLS_REJECT_UNAUTHORIZED": 0,
+ "WEB_PATH": dirs["web"],
+ "FEATURE_PATH": "%s/services/settings/ui/tests/acceptance/features" % dirs["base"],
+ "MIDDLEWARE_HOST": "http://middleware:3000",
+ },
+ "commands": [
+ # TODO: settings/package.json has all the acceptance test dependencies
+ # they shouldn't be needed since we could also use them from web:/tests/acceptance/package.json
+ "cd %s/services/settings" % dirs["base"],
+ "retry -t 3 'yarn install --immutable'",
+ "make test-acceptance-webui",
+ ],
+ "volumes": [{
+ "name": "uploads",
+ "path": "/uploads",
+ }],
+ },
+ ] + failEarly(ctx, early_fail),
"services": [
{
"name": "redis",
@@ -1815,7 +1792,7 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = [], depends_on =
"STORAGE_SYSTEM_DRIVER_OCIS_ROOT": "/srv/app/tmp/ocis/storage/metadata",
"SHARING_USER_JSON_FILE": "/srv/app/tmp/ocis/shares.json",
"PROXY_ENABLE_BASIC_AUTH": True,
- "WEB_UI_CONFIG": "/drone/src/tests/config/drone/ocis-config.json",
+ "WEB_UI_CONFIG": "%s/tests/config/drone/ocis-config.json" % dirs["base"],
"OCIS_LOG_LEVEL": "error",
"SETTINGS_DATA_PATH": "/srv/app/tmp/ocis/settings",
"IDM_CREATE_DEMO_USERS": True,
@@ -2348,7 +2325,7 @@ def pipelineSanityChecks(ctx, pipelines):
OCIS_URL = "https://ocis-server:9200"
OCIS_DOMAIN = "ocis-server:9200"
OC10_URL = "http://oc10:8080"
-PARALLEL_DEPLOY_CONFIG_PATH = "/drone/src/tests/parallelDeployAcceptance/drone"
+PARALLEL_DEPLOY_CONFIG_PATH = "%s/tests/parallelDeployAcceptance/drone" % dirs["base"]
# step volumes
stepVolumeOC10Templates = \
@@ -2496,10 +2473,10 @@ def parallelAcceptance(env):
"REVA_LDAP_BASE_DN": "dc=owncloud,dc=com",
"REVA_LDAP_HOSTNAME": "openldap",
"REVA_LDAP_BIND_DN": "cn=admin,dc=owncloud,dc=com",
- "SKELETON_DIR": "/drone/src/%s/data/apiSkeleton" % dirs["testing_app"],
- "PATH_TO_CORE": "/drone/src/%s" % dirs["core"],
+ "SKELETON_DIR": "/%s/%s/data/apiSkeleton" % (dirs["base"], dirs["testing_app"]),
+ "PATH_TO_CORE": "/%s/%s" % (dirs["base"], dirs["core"]),
"OCIS_REVA_DATA_ROOT": "/mnt/data/",
- "EXPECTED_FAILURES_FILE": "/drone/src/tests/parallelDeployAcceptance/expected-failures-API.md",
+ "EXPECTED_FAILURES_FILE": "%s/tests/parallelDeployAcceptance/expected-failures-API.md" % dirs["base"],
"OCIS_SKELETON_STRATEGY": "copy",
"SEND_SCENARIO_LINE_REFERENCES": "true",
"UPLOAD_DELETE_WAIT_TIME": "1",
@@ -2799,3 +2776,134 @@ def setupForLitmus():
"cat .env",
],
}]
+
+def generateWebCache(ctx):
+ ocis_git_base_url = "https://raw.githubusercontent.com/owncloud/ocis"
+ path_to_drone_env = "%s/%s/.drone.env" % (ocis_git_base_url, ctx.build.commit)
+ path_to_check_script = "%s/%s/tests/config/drone/check_web_cache.sh" % (ocis_git_base_url, ctx.build.commit)
+
+ return [
+ {
+ "name": "get-drone-env-and-check-script",
+ "image": OC_UBUNTU,
+ "commands": [
+ "curl -s -o .drone.env %s" % path_to_drone_env,
+ "curl -s -o check_web_cache.sh %s" % path_to_check_script,
+ ],
+ },
+ {
+ "name": "check-for-web-cache",
+ "image": OC_UBUNTU,
+ "environment": {
+ "CACHE_ENDPOINT": {
+ "from_secret": "cache_public_s3_server",
+ },
+ "CACHE_BUCKET": {
+ "from_secret": "cache_public_s3_bucket",
+ },
+ },
+ "commands": [
+ "bash check_web_cache.sh",
+ ],
+ },
+ {
+ "name": "clone-web",
+ "image": OC_CI_NODEJS % DEFAULT_NODEJS_VERSION,
+ "commands": [
+ ". ./.drone.env",
+ "rm -rf %s" % dirs["web"],
+ "git clone -b $WEB_BRANCH --single-branch --no-tags https://github.com/owncloud/web.git %s" % dirs["web"],
+ "cd %s && git checkout $WEB_COMMITID" % dirs["web"],
+ "ls -la",
+ ],
+ },
+ {
+ "name": "cache-web",
+ "image": MINIO_MC,
+ "environment": MINIO_MC_ENV,
+ "commands": [
+ "source ./.drone.env",
+ # cache using the minio/mc client to the 'owncloud' bucket (long term bucket)
+ "mc alias set s3 $MC_HOST $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY",
+ "mc mirror --overwrite --remove %s s3/$CACHE_BUCKET/ocis/web-test-runner/$WEB_COMMITID" % dirs["web"],
+ ],
+ },
+ {
+ "name": "install-yarn",
+ "image": OC_CI_NODEJS % DEFAULT_NODEJS_VERSION,
+ "commands": [
+ "cd %s" % dirs["web"],
+ "retry -t 3 'yarn install --immutable --frozen-lockfile'",
+ "cd %s/tests/acceptance" % dirs["web"],
+ "retry -t 3 'yarn install --immutable --frozen-lockfile'",
+ ],
+ },
+ {
+ "name": "cache-yarn",
+ "image": MINIO_MC,
+ "environment": MINIO_MC_ENV,
+ "commands": [
+ "source ./.drone.env",
+ # cache using the minio/mc client to the 'owncloud' bucket (long term bucket)
+ "mc alias set s3 $MC_HOST $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY",
+ "mc mirror --overwrite --remove %s/.yarn s3/$CACHE_BUCKET/ocis/web-test-runner/yarn-e2e-$WEB_COMMITID" % dirs["web"],
+ "mc mirror --overwrite --remove %s/tests/acceptance/.yarn s3/$CACHE_BUCKET/ocis/web-test-runner/yarn-acceptance-$WEB_COMMITID" % dirs["web"],
+ ],
+ },
+ ]
+
+def restoreWebCache():
+ return [{
+ "name": "restore-web-cache",
+ "image": MINIO_MC,
+ "environment": MINIO_MC_ENV,
+ "commands": [
+ "source ./.drone.env",
+ "mc alias set s3 $MC_HOST $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY",
+ "mc mirror s3/$CACHE_BUCKET/ocis/web-test-runner/$WEB_COMMITID %s" % dirs["web"],
+ "ls -la %s" % dirs["web"],
+ "chmod +x %s/tests/acceptance/*.sh" % dirs["web"],
+ ],
+ }]
+
+def restoreWebE2EYarnCache():
+ return [{
+ "name": "restore-web-e2e-yarn-cache",
+ "image": MINIO_MC,
+ "environment": MINIO_MC_ENV,
+ "commands": [
+ "source ./.drone.env",
+ "mc alias set s3 $MC_HOST $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY",
+ "mc mirror s3/$CACHE_BUCKET/ocis/web-test-runner/yarn-e2e-$WEB_COMMITID %s/.yarn" % dirs["web"],
+ "ls -la %s/.yarn" % dirs["web"],
+ ],
+ }, {
+ # we need to install again becase the node_modules are not cached
+ "name": "install-yarn-e2e",
+ "image": OC_CI_NODEJS % DEFAULT_NODEJS_VERSION,
+ "commands": [
+ "cd %s" % dirs["web"],
+ "retry -t 3 'yarn install --immutable'",
+ ],
+ }]
+
+def restoreWebAcceptanceYarnCache():
+ return [{
+ "name": "restore-web-acceptance-yarn-cache",
+ "image": MINIO_MC,
+ "environment": MINIO_MC_ENV,
+ "commands": [
+ "source ./.drone.env",
+ "mc alias set s3 $MC_HOST $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY",
+ "mc mirror s3/$CACHE_BUCKET/ocis/web-test-runner/yarn-acceptance-$WEB_COMMITID %s/tests/acceptance/.yarn" % dirs["web"],
+ "ls -la %s/tests/acceptance/.yarn" % dirs["web"],
+ ],
+ }, {
+ # we need to install again becase the node_modules are not cached
+ "name": "install-yarn-acceptance",
+ "image": OC_CI_NODEJS % DEFAULT_NODEJS_VERSION,
+ "commands": [
+ "cd %s/tests/acceptance" % dirs["web"],
+ "retry -t 3 'yarn install --immutable'",
+ ],
+ }]
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6562113d58c..2e837186c89 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,14 +9,18 @@ The following sections list the changes for unreleased.
* Bugfix - Fix handling of invalid LDAP users and groups: [#4274](https://github.com/owncloud/ocis/issues/4274)
* Bugfix - Fix search in received shares: [#4308](https://github.com/owncloud/ocis/issues/4308)
* Bugfix - Substring search for sharees: [#547](https://github.com/owncloud/ocis/issues/547)
+* Bugfix - Fix unrestricted quota on the graphAPI: [#4363](https://github.com/owncloud/ocis/pull/4363)
* Bugfix - Space Creators can hand over spaces: [#4244](https://github.com/owncloud/ocis/pull/4244)
* Enhancement - Add drives field to users endpoint: [#4072](https://github.com/owncloud/ocis/pull/4072)
* Enhancement - Improve validation of OIDC access tokens: [#3841](https://github.com/owncloud/ocis/issues/3841)
* Enhancement - Improve error log for "could not get user by claim" error: [#4227](https://github.com/owncloud/ocis/pull/4227)
* Enhancement - Allow providing list of services NOT to start: [#4254](https://github.com/owncloud/ocis/pull/4254)
* Enhancement - Introduce insecure flag for smtp email notifications: [#4279](https://github.com/owncloud/ocis/pull/4279)
+* Enhancement - Fix behavior for foobar (in present tense): [#4346](https://github.com/owncloud/ocis/pull/4346)
+* Enhancement - Use storageID when requesting special items: [#4356](https://github.com/owncloud/ocis/pull/4356)
* Enhancement - Update reva to vx.x.x: [#4294](https://github.com/owncloud/ocis/pull/4294)
-* Enhancement - Update ownCloud Web to v5.7.0-rc.7: [#4314](https://github.com/owncloud/ocis/pull/4314)
+* Enhancement - Update ownCloud Web to v5.7.0-rc.8: [#4314](https://github.com/owncloud/ocis/pull/4314)
+* Enhancement - Expand personal drive on the graph user: [#4357](https://github.com/owncloud/ocis/pull/4357)
## Details
@@ -48,6 +52,13 @@ The following sections list the changes for unreleased.
https://github.com/owncloud/ocis/issues/547
+* Bugfix - Fix unrestricted quota on the graphAPI: [#4363](https://github.com/owncloud/ocis/pull/4363)
+
+ Unrestricted quota needs to show 0 on the API. It is not good for clients when the property is
+ missing.
+
+ https://github.com/owncloud/ocis/pull/4363
+
* Bugfix - Space Creators can hand over spaces: [#4244](https://github.com/owncloud/ocis/pull/4244)
Set no owner on non personal spaces to be able to pass the space manager role to a new user.
@@ -99,6 +110,28 @@ The following sections list the changes for unreleased.
https://github.com/owncloud/ocis/pull/4279
+* Enhancement - Fix behavior for foobar (in present tense): [#4346](https://github.com/owncloud/ocis/pull/4346)
+
+ We've added the configuration option `PROXY_OIDC_REWRITE_WELLKNOWN` to rewrite the
+ `/.well-known/openid-configuration` endpoint. If active, it serves the
+ `/.well-known/openid-configuration` response of the original IDP configured in
+ `OCIS_OIDC_ISSUER` / `PROXY_OIDC_ISSUER`. This is needed so that the Desktop Client,
+ Android Client and iOS Client can discover the OIDC identity provider.
+
+ Previously this rewrite needed to be performed with an external proxy as NGINX or Traefik if an
+ external IDP was used.
+
+ https://github.com/owncloud/ocis/issues/2819
+ https://github.com/owncloud/ocis/issues/3280
+ https://github.com/owncloud/ocis/pull/4346
+
+* Enhancement - Use storageID when requesting special items: [#4356](https://github.com/owncloud/ocis/pull/4356)
+
+ We need to use the storageID when requesting the special items of a space to spare a registry
+ lookup and improve the performance
+
+ https://github.com/owncloud/ocis/pull/4356
+
* Enhancement - Update reva to vx.x.x: [#4294](https://github.com/owncloud/ocis/pull/4294)
Updated reva to version x.x.x. This update includes:
@@ -111,11 +144,11 @@ The following sections list the changes for unreleased.
https://github.com/owncloud/ocis/pull/4294
https://github.com/owncloud/ocis/pull/4330
-* Enhancement - Update ownCloud Web to v5.7.0-rc.7: [#4314](https://github.com/owncloud/ocis/pull/4314)
+* Enhancement - Update ownCloud Web to v5.7.0-rc.8: [#4314](https://github.com/owncloud/ocis/pull/4314)
Tags: web
- We updated ownCloud Web to v5.7.0-rc.7. Please refer to the changelog (linked) for details on
+ We updated ownCloud Web to v5.7.0-rc.8. Please refer to the changelog (linked) for details on
the web release.
* Bugfix [owncloud/web#7080](https://github.com/owncloud/web/issues/7080): Add Droparea again
@@ -135,14 +168,19 @@ The following sections list the changes for unreleased.
* Bugfix [owncloud/web#7272](https://github.com/owncloud/web/issues/7272): Print backend version
* Bugfix [owncloud/web#7379](https://github.com/owncloud/web/pull/7379): Rename shared space resource not possible
* Bugfix [owncloud/web#7210](https://github.com/owncloud/web/pull/7210): Repair navigation highlighter
+ * Bugfix [owncloud/web#7393](https://github.com/owncloud/web/pull/7393): Selected item bottom glue
* Bugfix [owncloud/web#7308](https://github.com/owncloud/web/pull/7308): "Shared with others" and "Shared via Link" resource links not working
+ * Bugfix [owncloud/web#7400](https://github.com/owncloud/web/issues/7400): Respect space quota permission
* Bugfix [owncloud/web#7349](https://github.com/owncloud/web/pull/7349): Missing quick actions in spaces file list
+ * Bugfix [owncloud/web#7396](https://github.com/owncloud/web/pull/7396): Add storage ID when navigating to a shared parent directory
+ * Bugfix [owncloud/web#7394](https://github.com/owncloud/web/pull/7394): Suppress active panel error log
* Bugfix [owncloud/web#7038](https://github.com/owncloud/web/issues/7038): File list render performance
* Bugfix [owncloud/web#7240](https://github.com/owncloud/web/issues/7240): Access token renewal during upload
* Bugfix [owncloud/web#7376](https://github.com/owncloud/web/pull/7376): Tooltips not shown on disabled create and upload button
* Bugfix [owncloud/web#7297](https://github.com/owncloud/web/pull/7297): Upload overlay progress bar spacing
* Bugfix [owncloud/web#7332](https://github.com/owncloud/web/pull/7332): Users list not loading if user has no role
* Bugfix [owncloud/web#7313](https://github.com/owncloud/web/pull/7313): Versions of shared files not visible
+ * Enhancement [owncloud/web#7404](https://github.com/owncloud/web/pull/7404): Adjust helper texts
* Enhancement [owncloud/web#7350](https://github.com/owncloud/web/pull/7350): Change file loading mechanism in `preview` app
* Enhancement [owncloud/web#7356](https://github.com/owncloud/web/pull/7356): Declined shares are now easily accessible
* Enhancement [owncloud/web#7365](https://github.com/owncloud/web/pull/7365): Drop menu styling in right sidebar
@@ -154,7 +192,14 @@ The following sections list the changes for unreleased.
* Enhancement [owncloud/web#7375](https://github.com/owncloud/web/pull/7375): User management app saved dialog
https://github.com/owncloud/ocis/pull/4314
- https://github.com/owncloud/web/releases/tag/v5.7.0-rc.7
+ https://github.com/owncloud/web/releases/tag/v5.7.0-rc.8
+
+* Enhancement - Expand personal drive on the graph user: [#4357](https://github.com/owncloud/ocis/pull/4357)
+
+ We can now list the personal drive on the users endpoint via the graph API. A user can add an
+ `$expand=drive` query to list the personal drive of the requested user.
+
+ https://github.com/owncloud/ocis/pull/4357
# Changelog for [2.0.0-beta.5] (2022-07-19)
The following sections list the changes for 2.0.0-beta.5.
@@ -1326,7 +1371,7 @@ The following sections list the changes for 2.0.0-beta.5.
The following sections list the changes for 1.20.0.
-[1.20.0]: https://github.com/owncloud/ocis/compare/v1.19.1...v1.20.0
+[1.20.0]: https://github.com/owncloud/ocis/compare/v1.19.0...v1.20.0
## Summary
@@ -1494,28 +1539,11 @@ The following sections list the changes for 1.20.0.
Group member remove
https://github.com/owncloud/ocis/pull/3467
-# Changelog for [1.19.1] (2022-03-29)
-
-The following sections list the changes for 1.19.1.
-
-[1.19.1]: https://github.com/owncloud/ocis/compare/v1.19.0...v1.19.1
-
-## Summary
-
-* Bugfix - Return correct special item urls: [#3419](https://github.com/owncloud/ocis/pull/3419)
-
-## Details
-
-* Bugfix - Return correct special item urls: [#3419](https://github.com/owncloud/ocis/pull/3419)
-
- URLs for Special items (space image, readme) were broken.
-
- https://github.com/owncloud/ocis/pull/3419
# Changelog for [1.19.0] (2022-03-29)
The following sections list the changes for 1.19.0.
-[1.19.0]: https://github.com/owncloud/ocis/compare/v1.18.0...v1.19.0
+[1.19.0]: https://github.com/owncloud/ocis/compare/v1.19.1...v1.19.0
## Summary
@@ -1684,6 +1712,23 @@ The following sections list the changes for 1.19.0.
https://github.com/owncloud/ocis/pull/3291
https://github.com/owncloud/ocis/pull/3375
https://github.com/owncloud/web/releases/tag/v5.3.0
+# Changelog for [1.19.1] (2022-03-29)
+
+The following sections list the changes for 1.19.1.
+
+[1.19.1]: https://github.com/owncloud/ocis/compare/v1.18.0...v1.19.1
+
+## Summary
+
+* Bugfix - Return correct special item urls: [#3419](https://github.com/owncloud/ocis/pull/3419)
+
+## Details
+
+* Bugfix - Return correct special item urls: [#3419](https://github.com/owncloud/ocis/pull/3419)
+
+ URLs for Special items (space image, readme) were broken.
+
+ https://github.com/owncloud/ocis/pull/3419
# Changelog for [1.18.0] (2022-03-03)
The following sections list the changes for 1.18.0.
diff --git a/changelog/unreleased/feature-rewrite-well-known-openid-configuration.md b/changelog/unreleased/feature-rewrite-well-known-openid-configuration.md
new file mode 100644
index 00000000000..92ce995ffd8
--- /dev/null
+++ b/changelog/unreleased/feature-rewrite-well-known-openid-configuration.md
@@ -0,0 +1,10 @@
+Enhancement: Fix behavior for foobar (in present tense)
+
+We've added the configuration option `PROXY_OIDC_REWRITE_WELLKNOWN` to rewrite the `/.well-known/openid-configuration` endpoint.
+If active, it serves the `/.well-known/openid-configuration` response of the original IDP configured in `OCIS_OIDC_ISSUER` / `PROXY_OIDC_ISSUER`. This is needed so that the Desktop Client, Android Client and iOS Client can discover the OIDC identity provider.
+
+Previously this rewrite needed to be performed with an external proxy as NGINX or Traefik if an external IDP was used.
+
+https://github.com/owncloud/ocis/pull/4346
+https://github.com/owncloud/ocis/issues/2819
+https://github.com/owncloud/ocis/issues/3280
diff --git a/changelog/unreleased/fix-unrestricted-quota.md b/changelog/unreleased/fix-unrestricted-quota.md
new file mode 100644
index 00000000000..932a62b71d0
--- /dev/null
+++ b/changelog/unreleased/fix-unrestricted-quota.md
@@ -0,0 +1,5 @@
+Bugfix: Fix unrestricted quota on the graphAPI
+
+Unrestricted quota needs to show 0 on the API. It is not good for clients when the property is missing.
+
+https://github.com/owncloud/ocis/pull/4363
diff --git a/changelog/unreleased/special-items-improvements.md b/changelog/unreleased/special-items-improvements.md
new file mode 100644
index 00000000000..4a402d45dbb
--- /dev/null
+++ b/changelog/unreleased/special-items-improvements.md
@@ -0,0 +1,5 @@
+Enhancement: Use storageID when requesting special items
+
+We need to use the storageID when requesting the special items of a space to spare a registry lookup and improve the performance
+
+https://github.com/owncloud/ocis/pull/4356
diff --git a/changelog/unreleased/update-web-beta.6.md b/changelog/unreleased/update-web-beta.6.md
index b928f69459e..8198af3b853 100644
--- a/changelog/unreleased/update-web-beta.6.md
+++ b/changelog/unreleased/update-web-beta.6.md
@@ -1,8 +1,8 @@
-Enhancement: Update ownCloud Web to v5.7.0-rc.7
+Enhancement: Update ownCloud Web to v5.7.0-rc.8
Tags: web
-We updated ownCloud Web to v5.7.0-rc.7. Please refer to the changelog (linked) for details on the web release.
+We updated ownCloud Web to v5.7.0-rc.8. Please refer to the changelog (linked) for details on the web release.
* Bugfix [owncloud/web#7080](https://github.com/owncloud/web/issues/7080): Add Droparea again
* Bugfix [owncloud/web#7357](https://github.com/owncloud/web/pull/7357): Batch deleting multiple files
@@ -21,14 +21,19 @@ We updated ownCloud Web to v5.7.0-rc.7. Please refer to the changelog (linked) f
* Bugfix [owncloud/web#7272](https://github.com/owncloud/web/issues/7272): Print backend version
* Bugfix [owncloud/web#7379](https://github.com/owncloud/web/pull/7379): Rename shared space resource not possible
* Bugfix [owncloud/web#7210](https://github.com/owncloud/web/pull/7210): Repair navigation highlighter
+* Bugfix [owncloud/web#7393](https://github.com/owncloud/web/pull/7393): Selected item bottom glue
* Bugfix [owncloud/web#7308](https://github.com/owncloud/web/pull/7308): "Shared with others" and "Shared via Link" resource links not working
+* Bugfix [owncloud/web#7400](https://github.com/owncloud/web/issues/7400): Respect space quota permission
* Bugfix [owncloud/web#7349](https://github.com/owncloud/web/pull/7349): Missing quick actions in spaces file list
+* Bugfix [owncloud/web#7396](https://github.com/owncloud/web/pull/7396): Add storage ID when navigating to a shared parent directory
+* Bugfix [owncloud/web#7394](https://github.com/owncloud/web/pull/7394): Suppress active panel error log
* Bugfix [owncloud/web#7038](https://github.com/owncloud/web/issues/7038): File list render performance
* Bugfix [owncloud/web#7240](https://github.com/owncloud/web/issues/7240): Access token renewal during upload
* Bugfix [owncloud/web#7376](https://github.com/owncloud/web/pull/7376): Tooltips not shown on disabled create and upload button
* Bugfix [owncloud/web#7297](https://github.com/owncloud/web/pull/7297): Upload overlay progress bar spacing
* Bugfix [owncloud/web#7332](https://github.com/owncloud/web/pull/7332): Users list not loading if user has no role
* Bugfix [owncloud/web#7313](https://github.com/owncloud/web/pull/7313): Versions of shared files not visible
+* Enhancement [owncloud/web#7404](https://github.com/owncloud/web/pull/7404): Adjust helper texts
* Enhancement [owncloud/web#7350](https://github.com/owncloud/web/pull/7350): Change file loading mechanism in `preview` app
* Enhancement [owncloud/web#7356](https://github.com/owncloud/web/pull/7356): Declined shares are now easily accessible
* Enhancement [owncloud/web#7365](https://github.com/owncloud/web/pull/7365): Drop menu styling in right sidebar
@@ -40,4 +45,4 @@ We updated ownCloud Web to v5.7.0-rc.7. Please refer to the changelog (linked) f
* Enhancement [owncloud/web#7375](https://github.com/owncloud/web/pull/7375): User management app saved dialog
https://github.com/owncloud/ocis/pull/4314
-https://github.com/owncloud/web/releases/tag/v5.7.0-rc.7
+https://github.com/owncloud/web/releases/tag/v5.7.0-rc.8
diff --git a/changelog/unreleased/user-expand-drive.md b/changelog/unreleased/user-expand-drive.md
new file mode 100644
index 00000000000..ad1041d6b50
--- /dev/null
+++ b/changelog/unreleased/user-expand-drive.md
@@ -0,0 +1,5 @@
+Enhancement: Expand personal drive on the graph user
+
+We can now list the personal drive on the users endpoint via the graph API. A user can add an `$expand=drive` query to list the personal drive of the requested user.
+
+https://github.com/owncloud/ocis/pull/4357
diff --git a/deployments/examples/oc10_ocis_parallel/docker-compose.yml b/deployments/examples/oc10_ocis_parallel/docker-compose.yml
index 114398b744d..c24ad7a6d2b 100644
--- a/deployments/examples/oc10_ocis_parallel/docker-compose.yml
+++ b/deployments/examples/oc10_ocis_parallel/docker-compose.yml
@@ -70,6 +70,7 @@ services:
environment:
# Keycloak IDP specific configuration
OCIS_OIDC_ISSUER: https://${KEYCLOAK_DOMAIN:-keycloak.owncloud.test}/auth/realms/${KEYCLOAK_REALM:-owncloud}
+ PROXY_OIDC_REWRITE_WELLKNOWN: "true"
WEB_OIDC_CLIENT_ID: ocis-web
WEB_OIDC_SCOPE: openid profile email owncloud
# external ldap is supposed to be read only
@@ -227,17 +228,6 @@ services:
- "traefik.http.routers.keycloak.tls.certresolver=http"
- "traefik.http.routers.keycloak.service=keycloak"
- "traefik.http.services.keycloak.loadbalancer.server.port=8080"
- # let /.well-known/openid-configuration be served by Keycloak
- # so that clients (Desktop, iOS and Android) can detect OIDC, 302 redirect is not valid according RFC
- # https://doc.owncloud.com/server/admin_manual/configuration/user/oidc/#set-up-service-discovery
- - "traefik.http.middlewares.idp-headers.headers.customrequestheaders.X-Forwarded-Host=${KEYCLOAK_DOMAIN:-keycloak.owncloud.test}"
- - "traefik.http.middlewares.idp-prefix.addprefix.prefix=/auth/realms/${KEYCLOAK_REALM:-owncloud}"
- - "traefik.http.middlewares.idp-override.chain.middlewares=idp-headers,idp-prefix"
- - "traefik.http.routers.idp-wellknown.entrypoints=https"
- - "traefik.http.routers.idp-wellknown.tls.certresolver=http"
- - "traefik.http.routers.idp-wellknown.rule=Host(`${CLOUD_DOMAIN:-cloud.owncloud.test}`) && Path(`/.well-known/openid-configuration`)"
- - "traefik.http.routers.idp-wellknown.middlewares=idp-override"
- - "traefik.http.routers.idp-wellknown.service=keycloak"
logging:
driver: "local"
restart: always
diff --git a/deployments/examples/ocis_keycloak/docker-compose.yml b/deployments/examples/ocis_keycloak/docker-compose.yml
index 7fbb44ae953..630ca1b70ea 100644
--- a/deployments/examples/ocis_keycloak/docker-compose.yml
+++ b/deployments/examples/ocis_keycloak/docker-compose.yml
@@ -57,6 +57,7 @@ services:
# Keycloak IDP specific configuration
PROXY_AUTOPROVISION_ACCOUNTS: "true"
OCIS_OIDC_ISSUER: https://${KEYCLOAK_DOMAIN:-keycloak.owncloud.test}/auth/realms/${KEYCLOAK_REALM:-oCIS}
+ PROXY_OIDC_REWRITE_WELLKNOWN: "true"
WEB_OIDC_CLIENT_ID: ${OCIS_OIDC_CLIENT_ID:-web}
# general config
OCIS_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test}
@@ -121,15 +122,6 @@ services:
- "traefik.http.routers.keycloak.tls.certresolver=http"
- "traefik.http.routers.keycloak.service=keycloak"
- "traefik.http.services.keycloak.loadbalancer.server.port=8080"
- # let /.well-known/openid-configuration be served by Keycloak
- - "traefik.http.middlewares.idp-headers.headers.customrequestheaders.X-Forwarded-Host=${KEYCLOAK_DOMAIN:-keycloak.owncloud.test}"
- - "traefik.http.middlewares.idp-prefix.addprefix.prefix=/auth/realms/${KEYCLOAK_REALM:-oCIS}"
- - "traefik.http.middlewares.idp-override.chain.middlewares=idp-headers,idp-prefix"
- - "traefik.http.routers.idp-wellknown.entrypoints=https"
- - "traefik.http.routers.idp-wellknown.tls.certresolver=http"
- - "traefik.http.routers.idp-wellknown.rule=Host(`${OCIS_DOMAIN:-ocis.owncloud.test}`) && Path(`/.well-known/openid-configuration`)"
- - "traefik.http.routers.idp-wellknown.middlewares=idp-override"
- - "traefik.http.routers.idp-wellknown.service=keycloak"
depends_on:
- postgres
logging:
diff --git a/deployments/examples/ocis_wopi/.env b/deployments/examples/ocis_wopi/.env
index 003e205896d..4f094654801 100644
--- a/deployments/examples/ocis_wopi/.env
+++ b/deployments/examples/ocis_wopi/.env
@@ -24,7 +24,7 @@ ADMIN_PASSWORD=
DEMO_USERS=
### Wopi server settings ###
-# cs3org wopi server version. Defaults to "latest"
+# cs3org wopi server version. Defaults to "v8.3.3"
WOPISERVER_DOCKER_TAG=
# cs3org wopi server domain. Defaults to "wopiserver.owncloud.test"
WOPISERVER_DOMAIN=
diff --git a/deployments/examples/ocis_wopi/docker-compose.yml b/deployments/examples/ocis_wopi/docker-compose.yml
index 3c4a40be551..90083d9024a 100644
--- a/deployments/examples/ocis_wopi/docker-compose.yml
+++ b/deployments/examples/ocis_wopi/docker-compose.yml
@@ -131,7 +131,7 @@ services:
driver: "local"
restart: always
wopiserver:
- image: cs3org/wopiserver:${WOPISERVER_DOCKER_TAG:-latest}
+ image: cs3org/wopiserver:${WOPISERVER_DOCKER_TAG:-v8.3.3}
networks:
ocis-net:
entrypoint:
diff --git a/docs/ocis/deployment/ocis_wopi.md b/docs/ocis/deployment/ocis_wopi.md
index 964f68dc4ff..658cd56f798 100644
--- a/docs/ocis/deployment/ocis_wopi.md
+++ b/docs/ocis/deployment/ocis_wopi.md
@@ -80,7 +80,7 @@ See also [example server setup]({{< ref "preparing_server" >}})
DEMO_USERS=
### Wopi server settings ###
- # cs3org wopi server version. Defaults to "latest"
+ # cs3org wopi server version. Defaults to "v8.3.3"
WOPISERVER_DOCKER_TAG=
# cs3org wopi server domain. Defaults to "wopiserver.owncloud.test"
WOPISERVER_DOMAIN=
diff --git a/docs/templates/ADOC.tmpl b/docs/templates/ADOC.tmpl
index 0028eafa222..9082884135d 100644
--- a/docs/templates/ADOC.tmpl
+++ b/docs/templates/ADOC.tmpl
@@ -8,10 +8,9 @@
| Description
{{- range .Fields}}
-{{ $numVars := len .EnvVars }}
| {{- range $i, $value := .EnvVars }}{{- if $i }} +
{{ end -}}
-`{{- $value }}`
+`{{- $value }}`
{{- end }}
a| [subs=-attributes]
+{{.Type}}+
diff --git a/go.mod b/go.mod
index 0e1217415af..669c130b7b0 100644
--- a/go.mod
+++ b/go.mod
@@ -39,7 +39,7 @@ require (
github.com/google/go-tika v0.2.0
github.com/gookit/config/v2 v2.1.2
github.com/gorilla/mux v1.8.0
- github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.1
+ github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.2
github.com/justinas/alice v1.2.0
github.com/libregraph/idm v0.3.1-0.20220718103124-c4f6613dce2b
github.com/libregraph/lico v0.54.1-0.20220325072321-31efc3995d63
@@ -52,9 +52,9 @@ require (
github.com/onsi/ginkgo/v2 v2.1.4
github.com/onsi/gomega v1.20.0
github.com/orcaman/concurrent-map v1.0.0
- github.com/owncloud/libre-graph-api-go v0.14.3
+ github.com/owncloud/libre-graph-api-go v0.16.0
github.com/pkg/errors v0.9.1
- github.com/prometheus/client_golang v1.12.2
+ github.com/prometheus/client_golang v1.13.0
github.com/rs/zerolog v1.27.0
github.com/sirupsen/logrus v1.9.0
github.com/spf13/cobra v1.5.0
@@ -65,7 +65,7 @@ require (
github.com/xhit/go-simple-mail/v2 v2.11.0
go-micro.dev/v4 v4.8.0
go.opencensus.io v0.23.0
- go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.33.0
+ go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.34.0
go.opentelemetry.io/otel v1.9.0
go.opentelemetry.io/otel/exporters/jaeger v1.9.0
go.opentelemetry.io/otel/sdk v1.9.0
@@ -75,7 +75,7 @@ require (
golang.org/x/image v0.0.0-20220321031419-a8550c1d254a
golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e
golang.org/x/oauth2 v0.0.0-20220722155238-128564f6959c
- google.golang.org/genproto v0.0.0-20220728213248-dd149ef739b9
+ google.golang.org/genproto v0.0.0-20220805133916-01dd62135a58
google.golang.org/grpc v1.48.0
google.golang.org/protobuf v1.28.1
gopkg.in/yaml.v2 v2.4.0
@@ -233,8 +233,8 @@ require (
github.com/pquerna/cachecontrol v0.1.0 // indirect
github.com/prometheus/alertmanager v0.24.0 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
- github.com/prometheus/common v0.32.1 // indirect
- github.com/prometheus/procfs v0.7.3 // indirect
+ github.com/prometheus/common v0.37.0 // indirect
+ github.com/prometheus/procfs v0.8.0 // indirect
github.com/prometheus/statsd_exporter v0.22.4 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/rs/cors v1.8.2 // indirect
diff --git a/go.sum b/go.sum
index 4d1570824f0..47efc7b289e 100644
--- a/go.sum
+++ b/go.sum
@@ -661,8 +661,8 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf
github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
-github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.1 h1:/sDbPb60SusIXjiJGYLUoS/rAQurQmvGWmwn2bBPM9c=
-github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.1/go.mod h1:G+WkljZi4mflcqVxYSgvt8MNctRQHjEH8ubKtt1Ka3w=
+github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.2 h1:BqHID5W5qnMkug0Z8UmL8tN0gAy4jQ+B4WFt8cCgluU=
+github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.2/go.mod h1:ZbS3MZTZq/apAfAEHGoB5HbsQQstoqP92SjAqtQ9zeg=
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI=
github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q=
github.com/hashicorp/consul/api v1.11.0 h1:Hw/G8TtRvOElqxVIhBzXciiSTbapq8hZ2XKZsXk5ZCE=
@@ -975,8 +975,8 @@ github.com/oracle/oci-go-sdk v24.3.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35uk
github.com/orcaman/concurrent-map v1.0.0 h1:I/2A2XPCb4IuQWcQhBhSwGfiuybl/J0ev9HDbW65HOY=
github.com/orcaman/concurrent-map v1.0.0/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI=
github.com/ovh/go-ovh v1.1.0/go.mod h1:AxitLZ5HBRPyUd+Zl60Ajaag+rNTdVXWIkzfrVuTXWA=
-github.com/owncloud/libre-graph-api-go v0.14.3 h1:+lkIkLHjrLfazANYfg2MYEhaJsMXzfOjtIY1hF3PbU4=
-github.com/owncloud/libre-graph-api-go v0.14.3/go.mod h1:579sFrPP7aP24LZXGPopLfvE+hAka/2DYHk0+Ij+w+U=
+github.com/owncloud/libre-graph-api-go v0.16.0 h1:CyW69/lREyx+nkUrXYJnMyshBygwkfPVCjm0ngqjcYs=
+github.com/owncloud/libre-graph-api-go v0.16.0/go.mod h1:579sFrPP7aP24LZXGPopLfvE+hAka/2DYHk0+Ij+w+U=
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw=
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0=
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
@@ -1018,8 +1018,9 @@ github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP
github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=
github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=
github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY=
-github.com/prometheus/client_golang v1.12.2 h1:51L9cDoUHVrXx4zWYlcLQIZ+d+VXHgqnYKkIuq4g/34=
github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY=
+github.com/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU=
+github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ=
github.com/prometheus/client_model v0.0.0-20170216185247-6f3806018612/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
@@ -1039,8 +1040,9 @@ github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9
github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=
github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=
github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=
-github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4=
github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=
+github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE=
+github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA=
github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI=
github.com/prometheus/exporter-toolkit v0.7.1/go.mod h1:ZUBIj498ePooX9t/2xtDjeQYwvRpiPP2lh5u4iblj2g=
github.com/prometheus/procfs v0.0.0-20170703101242-e645f4e5aaa8/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
@@ -1052,8 +1054,9 @@ github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDa
github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
-github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU=
github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
+github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo=
+github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4=
github.com/prometheus/statsd_exporter v0.21.0/go.mod h1:rbT83sZq2V+p73lHhPZfMc3MLCHmSHelCh9hSGYNLTQ=
github.com/prometheus/statsd_exporter v0.22.4 h1:bGhC0iI9DM8m9KIUlbcr3uzXnopagrajEKoP790256k=
github.com/prometheus/statsd_exporter v0.22.4/go.mod h1:N4Z1+iSqc9rnxlT1N8Qn3l65Vzb5t4Uq0jpg8nxyhio=
@@ -1249,8 +1252,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M=
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
-go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.33.0 h1:z6rnla1Asjzn0FrhohzIbDi4bxbtc6EMmQ7f5ZPn+pA=
-go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.33.0/go.mod h1:y/SlJpJQPd2UzfBCj0E9Flk9FDCtTyqUmaCB41qFrWI=
+go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.34.0 h1:PNEMW4EvpNQ7SuoPFNkvbZqi1STkTPKq+8vfoMl/6AE=
+go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.34.0/go.mod h1:fk1+icoN47ytLSgkoWHLJrtVTSQ+HgmkNgPTKrk/Nsc=
go.opentelemetry.io/otel v1.9.0 h1:8WZNQFIB2a71LnANS9JeyidJKKGOOremcUtb/OtHISw=
go.opentelemetry.io/otel v1.9.0/go.mod h1:np4EoPGzoPs3O67xUVNoPPcmSvsfOxNlNA4F4AC+0Eo=
go.opentelemetry.io/otel/exporters/jaeger v1.9.0 h1:gAEgEVGDWwFjcis9jJTOJqZNxDzoZfR12WNIxr7g9Ww=
@@ -1786,8 +1789,8 @@ google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2
google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI=
google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI=
google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E=
-google.golang.org/genproto v0.0.0-20220728213248-dd149ef739b9 h1:d3fKQZK+1rWQMg3xLKQbPMirUCo29I/NRdI2WarSzTg=
-google.golang.org/genproto v0.0.0-20220728213248-dd149ef739b9/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc=
+google.golang.org/genproto v0.0.0-20220805133916-01dd62135a58 h1:sRT5xdTkj1Kbk30qbYC7VyMj73N5pZYsw6v+Nrzdhno=
+google.golang.org/genproto v0.0.0-20220805133916-01dd62135a58/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc=
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.19.1/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
diff --git a/protogen/gen/ocis/services/search/v0/search.pb.web.go b/protogen/gen/ocis/services/search/v0/search.pb.web.go
index 427033152b2..a6a5842fec5 100644
--- a/protogen/gen/ocis/services/search/v0/search.pb.web.go
+++ b/protogen/gen/ocis/services/search/v0/search.pb.web.go
@@ -11,6 +11,7 @@ import (
"github.com/go-chi/chi/v5"
"github.com/go-chi/render"
"github.com/golang/protobuf/jsonpb"
+ merrors "go-micro.dev/v4/errors"
)
type webSearchProviderHandler struct {
@@ -36,7 +37,11 @@ func (h *webSearchProviderHandler) Search(w http.ResponseWriter, r *http.Request
req,
resp,
); err != nil {
- http.Error(w, err.Error(), http.StatusBadRequest)
+ if merr, ok := merrors.As(err); ok && merr.Code == http.StatusNotFound {
+ http.Error(w, err.Error(), http.StatusNotFound)
+ } else {
+ http.Error(w, err.Error(), http.StatusBadRequest)
+ }
return
}
@@ -58,7 +63,11 @@ func (h *webSearchProviderHandler) IndexSpace(w http.ResponseWriter, r *http.Req
req,
resp,
); err != nil {
- http.Error(w, err.Error(), http.StatusBadRequest)
+ if merr, ok := merrors.As(err); ok && merr.Code == http.StatusNotFound {
+ http.Error(w, err.Error(), http.StatusNotFound)
+ } else {
+ http.Error(w, err.Error(), http.StatusBadRequest)
+ }
return
}
@@ -99,7 +108,11 @@ func (h *webIndexProviderHandler) Search(w http.ResponseWriter, r *http.Request)
req,
resp,
); err != nil {
- http.Error(w, err.Error(), http.StatusBadRequest)
+ if merr, ok := merrors.As(err); ok && merr.Code == http.StatusNotFound {
+ http.Error(w, err.Error(), http.StatusNotFound)
+ } else {
+ http.Error(w, err.Error(), http.StatusBadRequest)
+ }
return
}
diff --git a/protogen/gen/ocis/services/settings/v0/settings.pb.web.go b/protogen/gen/ocis/services/settings/v0/settings.pb.web.go
index bcad905cce4..ef8718f98f8 100644
--- a/protogen/gen/ocis/services/settings/v0/settings.pb.web.go
+++ b/protogen/gen/ocis/services/settings/v0/settings.pb.web.go
@@ -11,6 +11,7 @@ import (
"github.com/go-chi/chi/v5"
"github.com/go-chi/render"
"github.com/golang/protobuf/jsonpb"
+ merrors "go-micro.dev/v4/errors"
ptypesempty "github.com/golang/protobuf/ptypes/empty"
)
@@ -38,7 +39,11 @@ func (h *webBundleServiceHandler) SaveBundle(w http.ResponseWriter, r *http.Requ
req,
resp,
); err != nil {
- http.Error(w, err.Error(), http.StatusBadRequest)
+ if merr, ok := merrors.As(err); ok && merr.Code == http.StatusNotFound {
+ http.Error(w, err.Error(), http.StatusNotFound)
+ } else {
+ http.Error(w, err.Error(), http.StatusBadRequest)
+ }
return
}
@@ -60,7 +65,11 @@ func (h *webBundleServiceHandler) GetBundle(w http.ResponseWriter, r *http.Reque
req,
resp,
); err != nil {
- http.Error(w, err.Error(), http.StatusBadRequest)
+ if merr, ok := merrors.As(err); ok && merr.Code == http.StatusNotFound {
+ http.Error(w, err.Error(), http.StatusNotFound)
+ } else {
+ http.Error(w, err.Error(), http.StatusBadRequest)
+ }
return
}
@@ -82,7 +91,11 @@ func (h *webBundleServiceHandler) ListBundles(w http.ResponseWriter, r *http.Req
req,
resp,
); err != nil {
- http.Error(w, err.Error(), http.StatusBadRequest)
+ if merr, ok := merrors.As(err); ok && merr.Code == http.StatusNotFound {
+ http.Error(w, err.Error(), http.StatusNotFound)
+ } else {
+ http.Error(w, err.Error(), http.StatusBadRequest)
+ }
return
}
@@ -104,7 +117,11 @@ func (h *webBundleServiceHandler) AddSettingToBundle(w http.ResponseWriter, r *h
req,
resp,
); err != nil {
- http.Error(w, err.Error(), http.StatusBadRequest)
+ if merr, ok := merrors.As(err); ok && merr.Code == http.StatusNotFound {
+ http.Error(w, err.Error(), http.StatusNotFound)
+ } else {
+ http.Error(w, err.Error(), http.StatusBadRequest)
+ }
return
}
@@ -126,7 +143,11 @@ func (h *webBundleServiceHandler) RemoveSettingFromBundle(w http.ResponseWriter,
req,
resp,
); err != nil {
- http.Error(w, err.Error(), http.StatusBadRequest)
+ if merr, ok := merrors.As(err); ok && merr.Code == http.StatusNotFound {
+ http.Error(w, err.Error(), http.StatusNotFound)
+ } else {
+ http.Error(w, err.Error(), http.StatusBadRequest)
+ }
return
}
@@ -170,7 +191,11 @@ func (h *webValueServiceHandler) SaveValue(w http.ResponseWriter, r *http.Reques
req,
resp,
); err != nil {
- http.Error(w, err.Error(), http.StatusBadRequest)
+ if merr, ok := merrors.As(err); ok && merr.Code == http.StatusNotFound {
+ http.Error(w, err.Error(), http.StatusNotFound)
+ } else {
+ http.Error(w, err.Error(), http.StatusBadRequest)
+ }
return
}
@@ -192,7 +217,11 @@ func (h *webValueServiceHandler) GetValue(w http.ResponseWriter, r *http.Request
req,
resp,
); err != nil {
- http.Error(w, err.Error(), http.StatusBadRequest)
+ if merr, ok := merrors.As(err); ok && merr.Code == http.StatusNotFound {
+ http.Error(w, err.Error(), http.StatusNotFound)
+ } else {
+ http.Error(w, err.Error(), http.StatusBadRequest)
+ }
return
}
@@ -214,7 +243,11 @@ func (h *webValueServiceHandler) ListValues(w http.ResponseWriter, r *http.Reque
req,
resp,
); err != nil {
- http.Error(w, err.Error(), http.StatusBadRequest)
+ if merr, ok := merrors.As(err); ok && merr.Code == http.StatusNotFound {
+ http.Error(w, err.Error(), http.StatusNotFound)
+ } else {
+ http.Error(w, err.Error(), http.StatusBadRequest)
+ }
return
}
@@ -236,7 +269,11 @@ func (h *webValueServiceHandler) GetValueByUniqueIdentifiers(w http.ResponseWrit
req,
resp,
); err != nil {
- http.Error(w, err.Error(), http.StatusBadRequest)
+ if merr, ok := merrors.As(err); ok && merr.Code == http.StatusNotFound {
+ http.Error(w, err.Error(), http.StatusNotFound)
+ } else {
+ http.Error(w, err.Error(), http.StatusBadRequest)
+ }
return
}
@@ -279,7 +316,11 @@ func (h *webRoleServiceHandler) ListRoles(w http.ResponseWriter, r *http.Request
req,
resp,
); err != nil {
- http.Error(w, err.Error(), http.StatusBadRequest)
+ if merr, ok := merrors.As(err); ok && merr.Code == http.StatusNotFound {
+ http.Error(w, err.Error(), http.StatusNotFound)
+ } else {
+ http.Error(w, err.Error(), http.StatusBadRequest)
+ }
return
}
@@ -301,7 +342,11 @@ func (h *webRoleServiceHandler) ListRoleAssignments(w http.ResponseWriter, r *ht
req,
resp,
); err != nil {
- http.Error(w, err.Error(), http.StatusBadRequest)
+ if merr, ok := merrors.As(err); ok && merr.Code == http.StatusNotFound {
+ http.Error(w, err.Error(), http.StatusNotFound)
+ } else {
+ http.Error(w, err.Error(), http.StatusBadRequest)
+ }
return
}
@@ -323,7 +368,11 @@ func (h *webRoleServiceHandler) AssignRoleToUser(w http.ResponseWriter, r *http.
req,
resp,
); err != nil {
- http.Error(w, err.Error(), http.StatusBadRequest)
+ if merr, ok := merrors.As(err); ok && merr.Code == http.StatusNotFound {
+ http.Error(w, err.Error(), http.StatusNotFound)
+ } else {
+ http.Error(w, err.Error(), http.StatusBadRequest)
+ }
return
}
@@ -345,7 +394,11 @@ func (h *webRoleServiceHandler) RemoveRoleFromUser(w http.ResponseWriter, r *htt
req,
resp,
); err != nil {
- http.Error(w, err.Error(), http.StatusBadRequest)
+ if merr, ok := merrors.As(err); ok && merr.Code == http.StatusNotFound {
+ http.Error(w, err.Error(), http.StatusNotFound)
+ } else {
+ http.Error(w, err.Error(), http.StatusBadRequest)
+ }
return
}
@@ -388,7 +441,11 @@ func (h *webPermissionServiceHandler) ListPermissionsByResource(w http.ResponseW
req,
resp,
); err != nil {
- http.Error(w, err.Error(), http.StatusBadRequest)
+ if merr, ok := merrors.As(err); ok && merr.Code == http.StatusNotFound {
+ http.Error(w, err.Error(), http.StatusNotFound)
+ } else {
+ http.Error(w, err.Error(), http.StatusBadRequest)
+ }
return
}
@@ -410,7 +467,11 @@ func (h *webPermissionServiceHandler) GetPermissionByID(w http.ResponseWriter, r
req,
resp,
); err != nil {
- http.Error(w, err.Error(), http.StatusBadRequest)
+ if merr, ok := merrors.As(err); ok && merr.Code == http.StatusNotFound {
+ http.Error(w, err.Error(), http.StatusNotFound)
+ } else {
+ http.Error(w, err.Error(), http.StatusBadRequest)
+ }
return
}
diff --git a/services/graph/pkg/service/v0/driveitems.go b/services/graph/pkg/service/v0/driveitems.go
index e49c3b832d9..a789e1accdc 100644
--- a/services/graph/pkg/service/v0/driveitems.go
+++ b/services/graph/pkg/service/v0/driveitems.go
@@ -227,6 +227,8 @@ func (g Graph) GetExtendedSpaceProperties(ctx context.Context, baseURL *url.URL,
for _, itemName := range names {
if itemID, ok := metadata[itemName]; ok {
rid, _ := storagespace.ParseID(string(itemID.Value))
+ // add the storageID of the space, all drive items of this space belong to the same storageID
+ rid.StorageId = space.GetRoot().GetStorageId()
spaceItem := g.getSpecialDriveItem(ctx, rid, itemName, baseURL, space)
if spaceItem != nil {
spaceItems = append(spaceItems, *spaceItem)
@@ -244,12 +246,12 @@ func (g Graph) getSpecialDriveItem(ctx context.Context, id storageprovider.Resou
spaceItem, err := g.getDriveItem(ctx, id)
if err != nil {
- g.logger.Error().Err(err).Str("ID", id.OpaqueId).Msg("Could not get readme Item")
+ g.logger.Error().Err(err).Str("ID", id.OpaqueId).Str("name", itemName).Msg("Could not get item info")
return nil
}
itemPath, err := g.getPathForResource(ctx, id)
if err != nil {
- g.logger.Error().Err(err).Str("ID", id.OpaqueId).Msg("Could not get readme path")
+ g.logger.Error().Err(err).Str("ID", id.OpaqueId).Str("name", itemName).Msg("Could not get item path")
return nil
}
spaceItem.SpecialFolder = &libregraph.SpecialFolder{Name: libregraph.PtrString(itemName)}
diff --git a/services/graph/pkg/service/v0/drives.go b/services/graph/pkg/service/v0/drives.go
index dfe702240a7..a704c8ab038 100644
--- a/services/graph/pkg/service/v0/drives.go
+++ b/services/graph/pkg/service/v0/drives.go
@@ -434,8 +434,7 @@ func (g Graph) ListStorageSpacesWithFilters(ctx context.Context, filters []*stor
if err != nil {
return nil, err
}
-
- res, err := client.ListStorageSpaces(ctx, &storageprovider.ListStorageSpacesRequest{
+ lReq := &storageprovider.ListStorageSpacesRequest{
Opaque: &types.Opaque{Map: map[string]*types.OpaqueEntry{
"permissions": {
Decoder: "json",
@@ -447,7 +446,8 @@ func (g Graph) ListStorageSpacesWithFilters(ctx context.Context, filters []*stor
},
}},
Filters: filters,
- })
+ }
+ res, err := client.ListStorageSpaces(ctx, lReq)
return res, err
}
@@ -640,16 +640,15 @@ func (g Graph) getDriveQuota(ctx context.Context, space *storageprovider.Storage
}
used := int64(res.UsedBytes)
+ total := int64(res.TotalBytes)
qta := libregraph.Quota{
Remaining: &remaining,
Used: &used,
+ Total: &total,
}
var t int64
- if total := int64(res.TotalBytes); total != 0 {
-
- // A quota was set
- qta.Total = &total
+ if total != 0 {
t = total
} else {
// Quota was not set
diff --git a/services/graph/pkg/service/v0/users.go b/services/graph/pkg/service/v0/users.go
index 8d7bd519128..d96007597ab 100644
--- a/services/graph/pkg/service/v0/users.go
+++ b/services/graph/pkg/service/v0/users.go
@@ -213,13 +213,13 @@ func (g Graph) GetUser(w http.ResponseWriter, r *http.Request) {
d.Quota = quota
if slices.Contains(sel, "drive") || slices.Contains(exp, "drive") {
if *d.DriveType == "personal" {
- drives = append(drives, *d)
+ user.Drive = d
}
} else {
drives = append(drives, *d)
+ user.Drives = drives
}
}
- user.Drives = drives
}
render.Status(r, http.StatusOK)
diff --git a/services/proxy/pkg/command/server.go b/services/proxy/pkg/command/server.go
index 5ce0d1373a7..81342945f12 100644
--- a/services/proxy/pkg/command/server.go
+++ b/services/proxy/pkg/command/server.go
@@ -173,6 +173,11 @@ func loadMiddlewares(ctx context.Context, logger log.Logger, cfg *config.Config)
chimiddleware.RequestID,
middleware.AccessLog(logger),
middleware.HTTPSRedirect,
+ middleware.OIDCWellKnownRewrite(
+ logger, cfg.OIDC.Issuer,
+ cfg.OIDC.RewriteWellKnown,
+ oidcHTTPClient,
+ ),
// now that we established the basics, on with authentication middleware
middleware.Authentication(
diff --git a/services/proxy/pkg/config/config.go b/services/proxy/pkg/config/config.go
index 2b9118deabc..ce98f8ede2f 100644
--- a/services/proxy/pkg/config/config.go
+++ b/services/proxy/pkg/config/config.go
@@ -95,6 +95,7 @@ type OIDC struct {
AccessTokenVerifyMethod string `yaml:"access_token_verify_method" env:"PROXY_OIDC_ACCESS_TOKEN_VERIFY_METHOD" desc:"Sets how OIDC access tokens should be verified. Possible values are 'none' and 'jwt'. When using 'none', no special validation apart from using it for accessing the IPD's userinfo endpoint will be done. When using 'jwt', it tries to parse the access token as a jwt token and verifies the signature using the keys published on the IDP's 'jwks_uri'."`
UserinfoCache UserinfoCache `yaml:"user_info_cache"`
JWKS JWKS `yaml:"jwks"`
+ RewriteWellKnown bool `yaml:"rewrite_well_known" env:"PROXY_OIDC_REWRITE_WELLKNOWN" desc:"Enables rewriting the /.well-known/openid-configuration to the configured OIDC issuer. Needed by the Desktop Client, Android Client and iOS Client to discover the OIDC provider."`
}
type JWKS struct {
diff --git a/services/proxy/pkg/middleware/oidc_well-known.go b/services/proxy/pkg/middleware/oidc_well-known.go
new file mode 100644
index 00000000000..26db70a58b1
--- /dev/null
+++ b/services/proxy/pkg/middleware/oidc_well-known.go
@@ -0,0 +1,54 @@
+package middleware
+
+import (
+ "io"
+ "net/http"
+ "net/url"
+ "path"
+
+ "github.com/owncloud/ocis/v2/ocis-pkg/log"
+)
+
+var (
+ wellKnownPath = "/.well-known/openid-configuration"
+)
+
+// OIDCWellKnownRewrite is a middleware that rewrites the /.well-known/openid-configuration endpoint for external IDPs.
+func OIDCWellKnownRewrite(logger log.Logger, oidcISS string, rewrite bool, oidcClient *http.Client) func(http.Handler) http.Handler {
+
+ oidcURL, _ := url.Parse(oidcISS)
+ oidcURL.Path = path.Join(oidcURL.Path, wellKnownPath)
+
+ return func(next http.Handler) http.Handler {
+ return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ if rewrite && path.Clean(r.URL.Path) == wellKnownPath {
+
+ wellKnownRes, err := oidcClient.Get(oidcURL.String())
+ if err != nil {
+ logger.Error().
+ Err(err).
+ Str("middleware", "oidc wellknown rewrite").
+ Str("url", oidcURL.String()).
+ Msg("get information from url failed")
+ w.WriteHeader(http.StatusInternalServerError)
+ }
+ defer wellKnownRes.Body.Close()
+
+ copyHeader(w.Header(), wellKnownRes.Header)
+ w.WriteHeader(wellKnownRes.StatusCode)
+ io.Copy(w, wellKnownRes.Body)
+
+ return
+ }
+ next.ServeHTTP(w, r)
+ })
+ }
+}
+
+func copyHeader(dst, src http.Header) {
+ for k, vv := range src {
+ for _, v := range vv {
+ dst.Add(k, v)
+ }
+ }
+}
diff --git a/services/storage-users/pkg/command/root.go b/services/storage-users/pkg/command/root.go
index 5ae9e6e86f5..21c3089b6cd 100644
--- a/services/storage-users/pkg/command/root.go
+++ b/services/storage-users/pkg/command/root.go
@@ -18,6 +18,7 @@ func GetCommands(cfg *config.Config) cli.Commands {
Server(cfg),
// interaction with this service
+ Uploads(cfg),
// infos about this service
Health(cfg),
diff --git a/services/storage-users/pkg/command/uploads.go b/services/storage-users/pkg/command/uploads.go
new file mode 100644
index 00000000000..0aa7174c348
--- /dev/null
+++ b/services/storage-users/pkg/command/uploads.go
@@ -0,0 +1,150 @@
+package command
+
+import (
+ "fmt"
+ "os"
+ "strconv"
+ "sync"
+ "time"
+
+ tusd "github.com/tus/tusd/pkg/handler"
+ "github.com/urfave/cli/v2"
+
+ "github.com/cs3org/reva/v2/pkg/storage"
+ "github.com/cs3org/reva/v2/pkg/storage/fs/registry"
+ "github.com/owncloud/ocis/v2/services/storage-users/pkg/config"
+ "github.com/owncloud/ocis/v2/services/storage-users/pkg/config/parser"
+ "github.com/owncloud/ocis/v2/services/storage-users/pkg/revaconfig"
+)
+
+func Uploads(cfg *config.Config) *cli.Command {
+ return &cli.Command{
+ Name: "uploads",
+ Usage: "manage uploads",
+ Before: func(c *cli.Context) error {
+ if err := parser.ParseConfig(cfg); err != nil {
+ fmt.Printf("%v", err)
+ return err
+ }
+ return nil
+ },
+ Subcommands: []*cli.Command{
+ ListUploads(cfg),
+ PurgeExpiredUploads(cfg),
+ },
+ }
+}
+
+// ListUploads prints a list of all incomplete uploads
+func ListUploads(cfg *config.Config) *cli.Command {
+ return &cli.Command{
+ Name: "list",
+ Usage: fmt.Sprintf("Print a list of all incomplete uploads"),
+ Category: "services",
+ Before: func(c *cli.Context) error {
+ err := parser.ParseConfig(cfg)
+ if err != nil {
+ fmt.Printf("%v", err)
+ os.Exit(1)
+ }
+ return err
+ },
+ Action: func(c *cli.Context) error {
+ f, ok := registry.NewFuncs[cfg.Driver]
+ if !ok {
+ fmt.Fprintf(os.Stderr, "Unknown filesystem driver '%s'\n", cfg.Driver)
+ os.Exit(1)
+ }
+ drivers := revaconfig.UserDrivers(cfg)
+ fs, err := f(drivers[cfg.Driver].(map[string]interface{}))
+ if err != nil {
+ fmt.Fprintf(os.Stderr, "Failed to initialize filesystem driver '%s'\n", cfg.Driver)
+ return err
+ }
+
+ managingFS, ok := fs.(storage.UploadsManager)
+ if !ok {
+ fmt.Fprintf(os.Stderr, "'%s' storage does not support listing expired uploads\n", cfg.Driver)
+ os.Exit(1)
+ }
+
+ uploads, err := managingFS.ListUploads()
+ if err != nil {
+ return err
+ }
+
+ fmt.Println("Incomplete uploads:")
+ for _, u := range uploads {
+ fmt.Printf(" - %s (%s, Size: %d, Expires: %s)\n", u.ID, u.MetaData["filename"], u.Size, expiredString(u.MetaData["expires"]))
+ }
+ return nil
+ },
+ }
+}
+
+// PurgeExpiredUploads is the entry point for the server command.
+func PurgeExpiredUploads(cfg *config.Config) *cli.Command {
+ return &cli.Command{
+ Name: "purge",
+ Usage: fmt.Sprintf("Let %s extension clean up leftovers from expired downloads", cfg.Service.Name),
+ Category: "services",
+ Before: func(c *cli.Context) error {
+ err := parser.ParseConfig(cfg)
+ if err != nil {
+ fmt.Printf("%v", err)
+ os.Exit(1)
+ }
+ return err
+ },
+ Action: func(c *cli.Context) error {
+ f, ok := registry.NewFuncs[cfg.Driver]
+ if !ok {
+ fmt.Fprintf(os.Stderr, "Unknown filesystem driver '%s'\n", cfg.Driver)
+ os.Exit(1)
+ }
+ drivers := revaconfig.UserDrivers(cfg)
+ fs, err := f(drivers[cfg.Driver].(map[string]interface{}))
+ if err != nil {
+ fmt.Fprintf(os.Stderr, "Failed to initialize filesystem driver '%s'\n", cfg.Driver)
+ return err
+ }
+
+ managingFS, ok := fs.(storage.UploadsManager)
+ if !ok {
+ fmt.Fprintf(os.Stderr, "'%s' storage does not support purging expired uploads\n", cfg.Driver)
+ os.Exit(1)
+ }
+
+ wg := sync.WaitGroup{}
+ wg.Add(1)
+ purgedChannel := make(chan tusd.FileInfo)
+
+ go func() {
+ for purged := range purgedChannel {
+ fmt.Printf("Purging %s (Filename: %s, Size: %d, Expires: %s)\n",
+ purged.ID, purged.MetaData["filename"], purged.Size, expiredString(purged.MetaData["expires"]))
+
+ }
+ wg.Done()
+ }()
+
+ err = managingFS.PurgeExpiredUploads(purgedChannel)
+ close(purgedChannel)
+ wg.Wait()
+ if err != nil {
+ fmt.Fprintf(os.Stderr, "Failed to purge expired uploads '%s'\n", err)
+ return err
+ }
+ return nil
+ },
+ }
+}
+
+func expiredString(e string) string {
+ expired := "N/A"
+ iExpires, err := strconv.Atoi(e)
+ if err == nil {
+ expired = time.Unix(int64(iExpires), 0).Format(time.RFC3339)
+ }
+ return expired
+}
diff --git a/services/storage-users/pkg/config/config.go b/services/storage-users/pkg/config/config.go
index eb6a0aa8c17..12e8f4c4b42 100644
--- a/services/storage-users/pkg/config/config.go
+++ b/services/storage-users/pkg/config/config.go
@@ -30,6 +30,7 @@ type Config struct {
MountID string `yaml:"mount_id" env:"STORAGE_USERS_MOUNT_ID" desc:"Mount ID of this storage."`
ExposeDataServer bool `yaml:"expose_data_server" env:"STORAGE_USERS_EXPOSE_DATA_SERVER" desc:"Exposes the data server directly to users and bypasses the data gateway. Ensure that the data server address is reachable by users."`
ReadOnly bool `yaml:"readonly" env:"STORAGE_USERS_READ_ONLY" desc:"Set this storage to be read-only."`
+ UploadExpiration int64 `yaml:"upload_expiration" env:"STORAGE_USERS_UPLOAD_EXPIRATION" desc:"Duration after which uploads will expire."`
Supervised bool `yaml:"-"`
Context context.Context `yaml:"-"`
diff --git a/services/storage-users/pkg/config/defaults/defaultconfig.go b/services/storage-users/pkg/config/defaults/defaultconfig.go
index 425cf9a17fd..e5f23f103ae 100644
--- a/services/storage-users/pkg/config/defaults/defaultconfig.go
+++ b/services/storage-users/pkg/config/defaults/defaultconfig.go
@@ -39,11 +39,12 @@ func DefaultConfig() *config.Config {
Reva: &config.Reva{
Address: "127.0.0.1:9142",
},
- DataServerURL: "http://localhost:9158/data",
- DataGatewayURL: "https://localhost:9200/data",
- TransferExpires: 86400,
- MountID: "1284d238-aa92-42ce-bdc4-0b0000009157",
- Driver: "ocis",
+ DataServerURL: "http://localhost:9158/data",
+ DataGatewayURL: "https://localhost:9200/data",
+ TransferExpires: 86400,
+ MountID: "1284d238-aa92-42ce-bdc4-0b0000009157",
+ UploadExpiration: 24 * 60 * 60,
+ Driver: "ocis",
Drivers: config.Drivers{
OwnCloudSQL: config.OwnCloudSQLDriver{
Root: filepath.Join(defaults.BaseDataPath(), "storage", "owncloud"),
diff --git a/services/storage-users/pkg/revaconfig/config.go b/services/storage-users/pkg/revaconfig/config.go
index 21ce7f2e736..c6a2a713eb4 100644
--- a/services/storage-users/pkg/revaconfig/config.go
+++ b/services/storage-users/pkg/revaconfig/config.go
@@ -29,6 +29,7 @@ func StorageUsersConfigFromStruct(cfg *config.Config) map[string]interface{} {
"mount_id": cfg.MountID,
"expose_data_server": cfg.ExposeDataServer,
"data_server_url": cfg.DataServerURL,
+ "upload_expiration": cfg.UploadExpiration,
},
},
"interceptors": map[string]interface{}{
diff --git a/services/web/Makefile b/services/web/Makefile
index 0e8f5eb67b9..e42c485e134 100644
--- a/services/web/Makefile
+++ b/services/web/Makefile
@@ -1,6 +1,6 @@
SHELL := bash
NAME := web
-WEB_ASSETS_VERSION = v5.7.0-rc.7
+WEB_ASSETS_VERSION = v5.7.0-rc.8
include ../../.make/recursion.mk
diff --git a/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md b/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md
index b36b50d7238..1874e6f1f03 100644
--- a/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md
+++ b/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md
@@ -22,25 +22,9 @@ The expected failures in this file are from features in the owncloud/ocis repo.
### [Search by shares jail works incorrect](https://github.com/owncloud/ocis/issues/4014)
- [apiSpaces/search.feature:43](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/search.feature#L43)
-### [Depth infinity not supported for space Shares Jail](https://github.com/owncloud/ocis/issues/4188)
-- [apiSpaces/copySpaces.feature:112](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/copySpaces.feature#L112)
-- [apiSpaces/copySpaces.feature:113](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/copySpaces.feature#L113)
-- [apiSpaces/copySpaces.feature:114](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/copySpaces.feature#L114)
-- [apiSpaces/copySpaces.feature:163](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/copySpaces.feature#L163)
-- [apiSpaces/copySpaces.feature:260](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/copySpaces.feature#L260)
-- [apiSpaces/copySpaces.feature:261](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/copySpaces.feature#L261)
-- [apiSpaces/moveSpaces.feature:161](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/moveSpaces.feature#L161)
-- [apiSpaces/moveSpaces.feature:162](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/moveSpaces.feature#L162)
-- [apiSpaces/moveSpaces.feature:181](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/moveSpaces.feature#L181)
-- [apiSpaces/moveSpaces.feature:182](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/moveSpaces.feature#L182)
-- [apiSpaces/moveSpaces.feature:183](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/moveSpaces.feature#L183)
-- [apiSpaces/moveSpaces.feature:184](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/moveSpaces.feature#L184)
-- [apiSpaces/moveSpaces.feature:185](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/moveSpaces.feature#L185)
-- [apiSpaces/moveSpaces.feature:186](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/moveSpaces.feature#L186)
-- [apiSpaces/moveSpaces.feature:189](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/moveSpaces.feature#L189)
-
### [Changing personal drive quota on another user as admin is not possible](https://github.com/owncloud/ocis/issues/4325)
- [apiSpaces/changeSpaces.feature:221](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/changeSpaces.feature#L221)
- [apiSpaces/changeSpaces.feature:222](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/changeSpaces.feature#L222)
- [apiSpaces/changeSpaces.feature:223](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/changeSpaces.feature#L223)
- [apiSpaces/changeSpaces.feature:224](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/changeSpaces.feature#L224)
+
diff --git a/tests/acceptance/features/apiSpaces/copySpaces.feature b/tests/acceptance/features/apiSpaces/copySpaces.feature
index 03711d0f0a2..3d0cfa13d05 100644
--- a/tests/acceptance/features/apiSpaces/copySpaces.feature
+++ b/tests/acceptance/features/apiSpaces/copySpaces.feature
@@ -104,8 +104,8 @@ Feature: copy file
And user "Alice" has accepted share "/testshare" offered by user "Brian"
When user "Alice" copies file "project.txt" from space "Project" to "/testshare/project.txt" inside space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "201"
- And for user "Alice" the space "Shares Jail" should contain these entries:
- | /testshare/project.txt |
+ And for user "Alice" folder "testshare" of the space "Shares Jail" should contain these files:
+ | project.txt |
And for user "Alice" the content of the file "/testshare/project.txt" of the space "Shares Jail" should be "Project content"
Examples:
| role |
@@ -167,8 +167,8 @@ Feature: copy file
And user "Alice" has uploaded file with content "personal content" to "personal.txt"
When user "Alice" copies file "personal.txt" from space "Personal" to "/testshare/personal.txt" inside space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "201"
- And for user "Alice" the space "Shares Jail" should contain these entries:
- | /testshare/personal.txt |
+ And for user "Alice" folder "testshare" of the space "Shares Jail" should contain these files:
+ | personal.txt |
And for user "Alice" the content of the file "/testshare/personal.txt" of the space "Shares Jail" should be "personal content"
@@ -249,8 +249,8 @@ Feature: copy file
And user "Alice" has accepted share "/testshare2" offered by user "Brian"
When user "Alice" copies file "/testshare1/testshare1.txt" from space "Shares Jail" to "/testshare2/testshare1.txt" inside space "Shares Jail" using the WebDAV API
Then the HTTP status code should be "201"
- And for user "Alice" the space "Shares Jail" should contain these entries:
- | /testshare2/testshare1.txt |
+ And for user "Alice" folder "testshare2" of the space "Shares Jail" should contain these files:
+ | testshare1.txt |
And for user "Brian" the space "Personal" should contain these entries:
| /testshare2/testshare1.txt |
And for user "Alice" the content of the file "/testshare2/testshare1.txt" of the space "Shares Jail" should be "testshare1 content"
@@ -279,3 +279,175 @@ Feature: copy file
| permissions |
| 31 |
| 17 |
+
+
+ Scenario Outline: Copying a folder within the same space project with different role
+ Given the administrator has given "Alice" the role "Space Admin" using the settings api
+ And user "Alice" has created a space "Project" with the default quota using the GraphApi
+ And user "Alice" has created a folder "folder1" in space "Project"
+ And user "Alice" has created a folder "folder2" in space "Project"
+ And user "Alice" has uploaded a file inside space "Project" with content "some content" to "folder2/demo.txt"
+ And user "Alice" has shared a space "Project" to user "Brian" with role "