Compare commits
45
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8aa2b9e1c6 | ||
|
|
2817cd47f8 | ||
|
|
0668ccbcba | ||
|
|
6ac0211d4b | ||
|
|
e6d6d27afa | ||
|
|
dac33abe41 | ||
|
|
0ca6a6b70b | ||
|
|
1f1b0b4e94 | ||
|
|
1f069c7c00 | ||
|
|
a6a6c22c14 | ||
|
|
ee30eceb5d | ||
|
|
48fd95aec7 | ||
|
|
fcd13cf9b8 | ||
|
|
62afc6e9b6 | ||
|
|
72825ddae4 | ||
|
|
478960455f | ||
|
|
a87eeda1cd | ||
|
|
ab9893bc46 | ||
|
|
be6f691af3 | ||
|
|
659be90768 | ||
|
|
3f476680a3 | ||
|
|
23e59b5ded | ||
|
|
81ace6dd1d | ||
|
|
a6a7c69e8f | ||
|
|
c8dc52cd61 | ||
|
|
d37cea3a5e | ||
|
|
829e0341af | ||
|
|
263cb21c24 | ||
|
|
4670f03399 | ||
|
|
fb514c2ff1 | ||
|
|
a7d2ef2507 | ||
|
|
7af9cd9e53 | ||
|
|
26411f1f3b | ||
|
|
39c874873d | ||
|
|
8cd508660e | ||
|
|
d6cb6eeaa3 | ||
|
|
afb127090d | ||
|
|
9d3523e310 | ||
|
|
faf0e242cd | ||
|
|
e63ce368ed | ||
|
|
f280a00b7c | ||
|
|
dba9771229 | ||
|
|
45af862ee8 | ||
|
|
63973d2b26 | ||
|
|
f26165910d |
No files matched your search
+1
-1
@@ -1,3 +1,3 @@
|
||||
# The test runner source for UI tests
|
||||
WEB_COMMITID=b0adcdf5770f972f73a9e83ce0f023ee5f484e5a
|
||||
WEB_COMMITID=bdd7363797fd0f43c5f3d16579beb18d6f40bb0d
|
||||
WEB_BRANCH=master
|
||||
+58
@@ -59,6 +59,9 @@ config = {
|
||||
"wopiValidatorTests": {
|
||||
"skip": False,
|
||||
},
|
||||
"k6LoadTests": {
|
||||
"skip": False,
|
||||
},
|
||||
"localApiTests": {
|
||||
"basic": {
|
||||
"suites": [
|
||||
@@ -336,6 +339,9 @@ def testPipelines(ctx):
|
||||
if "skip" not in config["e2eTests"] or not config["e2eTests"]["skip"]:
|
||||
pipelines += e2eTests(ctx)
|
||||
|
||||
if "skip" not in config["k6LoadTests"] or not config["k6LoadTests"]["skip"]:
|
||||
pipelines += k6LoadTests(ctx)
|
||||
|
||||
return pipelines
|
||||
|
||||
def getGoBinForTesting(ctx):
|
||||
@@ -2776,3 +2782,55 @@ def logRequests():
|
||||
],
|
||||
},
|
||||
}]
|
||||
|
||||
def k6LoadTests(ctx):
|
||||
ocis_git_base_url = "https://raw.githubusercontent.com/owncloud/ocis"
|
||||
script_link = "%s/%s/tests/config/drone/run_k6_tests.sh" % (ocis_git_base_url, ctx.build.commit)
|
||||
return [{
|
||||
"kind": "pipeline",
|
||||
"type": "docker",
|
||||
"name": "k6-load-test",
|
||||
"clone": {
|
||||
"disable": True,
|
||||
},
|
||||
"steps": [
|
||||
{
|
||||
"name": "k6-load-test",
|
||||
"image": OC_CI_ALPINE,
|
||||
"environment": {
|
||||
"SSH_OCIS_REMOTE": {
|
||||
"from_secret": "ssh_ocis_remote",
|
||||
},
|
||||
"SSH_OCIS_USERNAME": {
|
||||
"from_secret": "ssh_ocis_user",
|
||||
},
|
||||
"SSH_OCIS_PASSWORD": {
|
||||
"from_secret": "ssh_ocis_pass",
|
||||
},
|
||||
"TEST_SERVER_URL": {
|
||||
"from_secret": "ssh_ocis_server_url",
|
||||
},
|
||||
"SSH_K6_REMOTE": {
|
||||
"from_secret": "ssh_k6_remote",
|
||||
},
|
||||
"SSH_K6_USERNAME": {
|
||||
"from_secret": "ssh_k6_user",
|
||||
},
|
||||
"SSH_K6_PASSWORD": {
|
||||
"from_secret": "ssh_k6_pass",
|
||||
},
|
||||
},
|
||||
"commands": [
|
||||
"curl -s -o run_k6_tests.sh %s" % script_link,
|
||||
"apk add --no-cache openssh-client sshpass",
|
||||
"sh %s/run_k6_tests.sh" % (dirs["base"]),
|
||||
],
|
||||
},
|
||||
],
|
||||
"depends_on": [],
|
||||
"trigger": {
|
||||
"event": [
|
||||
"cron",
|
||||
],
|
||||
},
|
||||
}]
|
||||
+206
-164
@@ -1,13 +1,13 @@
|
||||
# Table of Contents
|
||||
|
||||
* [Changelog for unreleased](#changelog-for-unreleased-unreleased)
|
||||
* [Changelog for 5.0.0](#changelog-for-500-2023-11-22)
|
||||
* [Changelog for 5.0.0](#changelog-for-500-2023-11-30)
|
||||
* [Changelog for 4.0.0](#changelog-for-400-2023-08-21)
|
||||
* [Changelog for 3.0.0](#changelog-for-300-2023-06-06)
|
||||
* [Changelog for 2.0.0](#changelog-for-200-2022-11-30)
|
||||
* [Changelog for 1.20.0](#changelog-for-1200-2022-04-13)
|
||||
* [Changelog for 1.19.1](#changelog-for-1191-2022-03-29)
|
||||
* [Changelog for 1.19.0](#changelog-for-1190-2022-03-29)
|
||||
* [Changelog for 1.19.1](#changelog-for-1191-2022-03-29)
|
||||
* [Changelog for 1.18.0](#changelog-for-1180-2022-03-03)
|
||||
* [Changelog for 1.17.0](#changelog-for-1170-2022-02-16)
|
||||
* [Changelog for 1.16.0](#changelog-for-1160-2021-12-10)
|
||||
@@ -36,79 +36,18 @@ The following sections list the changes for unreleased.
|
||||
|
||||
## Summary
|
||||
|
||||
* Bugfix - Fix wrong compile date: [#6132](https://github.com/owncloud/ocis/pull/6132)
|
||||
* Bugfix - Disable DEPTH infinity in PROPFIND: [#7746](https://github.com/owncloud/ocis/pull/7746)
|
||||
* Bugfix - Fix search service start: [#7795](https://github.com/owncloud/ocis/pull/7795)
|
||||
* Enhancement - Add banned password list to the default deployments: [#7784](https://github.com/owncloud/ocis/pull/7784)
|
||||
* Enhancement - Default link permission config: [#7783](https://github.com/owncloud/ocis/pull/7783)
|
||||
* Enhancement - Add user filter startswith and contains: [#7739](https://github.com/owncloud/ocis/pull/7739)
|
||||
* Enhancement - Update to go 1.21: [#7794](https://github.com/owncloud/ocis/pull/7794)
|
||||
* Enhancement - Add Sharing NG list permissions endpoint: [#7805](https://github.com/owncloud/ocis/pull/7805)
|
||||
* Enhancement - Add user list requires filter config: [#7866](https://github.com/owncloud/ocis/pull/7866)
|
||||
|
||||
## Details
|
||||
|
||||
* Bugfix - Fix wrong compile date: [#6132](https://github.com/owncloud/ocis/pull/6132)
|
||||
* Enhancement - Add user list requires filter config: [#7866](https://github.com/owncloud/ocis/pull/7866)
|
||||
|
||||
We fixed that current date is always printed.
|
||||
Introduce a config to require filters in order to list users in Web via
|
||||
`WEB_OPTION_USER_LIST_REQUIRES_FILTER`.
|
||||
|
||||
https://github.com/owncloud/ocis/issues/6124
|
||||
https://github.com/owncloud/ocis/pull/6132
|
||||
https://github.com/owncloud/ocis/pull/7866
|
||||
|
||||
* Bugfix - Disable DEPTH infinity in PROPFIND: [#7746](https://github.com/owncloud/ocis/pull/7746)
|
||||
|
||||
We fixed the Disabled DEPTH infinity in PROPFIND for: Personal /remote.php/dav/files/admin
|
||||
Public link share /remote.php/dav/public-files/<token> Trashbin
|
||||
/remote.php/dav/spaces/trash-bin/<personal-space-id>
|
||||
|
||||
https://github.com/owncloud/ocis/issues/7359
|
||||
https://github.com/owncloud/ocis/pull/7746
|
||||
https://github.com/cs3org/reva/pull/4278
|
||||
|
||||
* Bugfix - Fix search service start: [#7795](https://github.com/owncloud/ocis/pull/7795)
|
||||
|
||||
The `search` service would sometimes not start correctly because config values are
|
||||
overwritten by default configuration.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/7795
|
||||
|
||||
* Enhancement - Add banned password list to the default deployments: [#7784](https://github.com/owncloud/ocis/pull/7784)
|
||||
|
||||
We add banned password list to the default deployments
|
||||
|
||||
https://github.com/owncloud/ocis/issues/7724
|
||||
https://github.com/owncloud/ocis/pull/7784
|
||||
|
||||
* Enhancement - Default link permission config: [#7783](https://github.com/owncloud/ocis/pull/7783)
|
||||
|
||||
A new config for default link permissions that is being announced via capabilities has been
|
||||
added. It defaults to 1 (= public link with viewer permissions).
|
||||
|
||||
https://github.com/owncloud/web/issues/9919
|
||||
https://github.com/owncloud/ocis/pull/7783
|
||||
|
||||
* Enhancement - Add user filter startswith and contains: [#7739](https://github.com/owncloud/ocis/pull/7739)
|
||||
|
||||
We add two new filters to the user list endpoint. The `startswith` filter allows to filter users
|
||||
by the beginning of their name. The `contains` filter allows to filter users by a substring of
|
||||
their name.
|
||||
|
||||
https://github.com/owncloud/ocis/issues/5486
|
||||
https://github.com/owncloud/ocis/pull/7739
|
||||
|
||||
* Enhancement - Update to go 1.21: [#7794](https://github.com/owncloud/ocis/pull/7794)
|
||||
|
||||
We updated to go 1.21.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/7794
|
||||
|
||||
* Enhancement - Add Sharing NG list permissions endpoint: [#7805](https://github.com/owncloud/ocis/pull/7805)
|
||||
|
||||
We've added a new sharing ng endpoint which lists all permissions for a given item.
|
||||
|
||||
https://github.com/owncloud/ocis/issues/6993
|
||||
https://github.com/owncloud/ocis/pull/7805
|
||||
|
||||
# Changelog for [5.0.0] (2023-11-22)
|
||||
# Changelog for [5.0.0] (2023-11-30)
|
||||
|
||||
The following sections list the changes for 5.0.0.
|
||||
|
||||
@@ -121,7 +60,9 @@ The following sections list the changes for 5.0.0.
|
||||
* Bugfix - Don't reload web config: [#7369](https://github.com/owncloud/ocis/pull/7369)
|
||||
* Bugfix - Fix the auth service env variable: [#7523](https://github.com/owncloud/ocis/pull/7523)
|
||||
* Bugfix - Fix the kql-bleve search: [#7290](https://github.com/owncloud/ocis/pull/7290)
|
||||
* Bugfix - Fix wrong compile date: [#6132](https://github.com/owncloud/ocis/pull/6132)
|
||||
* Bugfix - Fix default language fallback: [#7465](https://github.com/owncloud/ocis/issues/7465)
|
||||
* Bugfix - Disable DEPTH infinity in PROPFIND: [#7746](https://github.com/owncloud/ocis/pull/7746)
|
||||
* Bugfix - Fix 403 in docs pipeline: [#7509](https://github.com/owncloud/ocis/issues/7509)
|
||||
* Bugfix - Fix libre-graph status codes: [#7678](https://github.com/owncloud/ocis/issues/7678)
|
||||
* Bugfix - Check school number for duplicates before adding a school: [#7351](https://github.com/owncloud/ocis/pull/7351)
|
||||
@@ -129,6 +70,7 @@ The following sections list the changes for 5.0.0.
|
||||
* Bugfix - Fix last month search: [#31145](https://github.com/golang/go/issues/31145)
|
||||
* Bugfix - Set existing mountpoint on auto accept: [#7592](https://github.com/owncloud/ocis/pull/7592)
|
||||
* Bugfix - Deprecate redundant encryptions settings for notification service: [#7345](https://github.com/owncloud/ocis/issues/7345)
|
||||
* Bugfix - Fix search service start: [#7795](https://github.com/owncloud/ocis/pull/7795)
|
||||
* Bugfix - Fix unlock via space API: [#7726](https://github.com/owncloud/ocis/pull/7726)
|
||||
* Bugfix - Fix the tgz mime type: [#7772](https://github.com/owncloud/ocis/pull/7772)
|
||||
* Bugfix - Token storage config fixed: [#7528](https://github.com/owncloud/ocis/pull/7528)
|
||||
@@ -139,11 +81,15 @@ The following sections list the changes for 5.0.0.
|
||||
* Change - Auto-Accept Shares: [#7097](https://github.com/owncloud/ocis/pull/7097)
|
||||
* Change - Change the default TUS chunk size: [#7273](https://github.com/owncloud/ocis/pull/7273)
|
||||
* Enhancement - Support spec violating AD FS access token issuer: [#7138](https://github.com/owncloud/ocis/pull/7138)
|
||||
* Enhancement - Add banned password list to the default deployments: [#7784](https://github.com/owncloud/ocis/pull/7784)
|
||||
* Enhancement - Default link permission config: [#7783](https://github.com/owncloud/ocis/pull/7783)
|
||||
* Enhancement - Add search MediaType filter: [#7602](https://github.com/owncloud/ocis/pull/7602)
|
||||
* Enhancement - Add "Last modified" filter Chip: [#7455](https://github.com/owncloud/ocis/pull/7455)
|
||||
* Enhancement - Add the Banned Passwords List: [#4197](https://github.com/cs3org/reva/pull/4197)
|
||||
* Enhancement - Add the password policies: [#7285](https://github.com/owncloud/ocis/pull/7285)
|
||||
* Enhancement - Add user filter startswith and contains: [#7739](https://github.com/owncloud/ocis/pull/7739)
|
||||
* Enhancement - Allow configuring additional routes: [#7740](https://github.com/owncloud/ocis/pull/7740)
|
||||
* Enhancement - Update to go 1.21: [#7794](https://github.com/owncloud/ocis/pull/7794)
|
||||
* Enhancement - Bump reva: [#7721](https://github.com/owncloud/ocis/pull/7721)
|
||||
* Enhancement - Edit wrong named enves: [#7406](https://github.com/owncloud/ocis/pull/7406)
|
||||
* Enhancement - Introduce clientlog service: [#7217](https://github.com/owncloud/ocis/pull/7217)
|
||||
@@ -154,6 +100,7 @@ The following sections list the changes for 5.0.0.
|
||||
* Enhancement - Add support for audio files to the thumbnails service: [#7491](https://github.com/owncloud/ocis/pull/7491)
|
||||
* Enhancement - New value `auto` for NOTIFICATIONS_SMTP_AUTHENTICATION: [#7356](https://github.com/owncloud/ocis/issues/7356)
|
||||
* Enhancement - Tika content extraction cleanup for search: [#7553](https://github.com/owncloud/ocis/pull/7553)
|
||||
* Enhancement - Add Sharing NG list permissions endpoint: [#7805](https://github.com/owncloud/ocis/pull/7805)
|
||||
* Enhancement - Add Sharing NG endpoints: [#7633](https://github.com/owncloud/ocis/pull/7633)
|
||||
* Enhancement - SSE for messaging: [#6992](https://github.com/owncloud/ocis/pull/6992)
|
||||
* Enhancement - Store and index metadata: [#7490](https://github.com/owncloud/ocis/pull/7490)
|
||||
@@ -172,7 +119,7 @@ The following sections list the changes for 5.0.0.
|
||||
* Enhancement - Make sse service scalable: [#7382](https://github.com/owncloud/ocis/pull/7382)
|
||||
* Enhancement - Allow configuring storage registry with envvars: [#7554](https://github.com/owncloud/ocis/pull/7554)
|
||||
* Enhancement - Thumbnail generation with image processors: [#7409](https://github.com/owncloud/ocis/pull/7409)
|
||||
* Enhancement - Update web to v8.0.0: [#7773](https://github.com/owncloud/ocis/pull/7773)
|
||||
* Enhancement - Update web to v8.0.0: [#7852](https://github.com/owncloud/ocis/pull/7852)
|
||||
* Enhancement - Configs for Web embed mode: [#7670](https://github.com/owncloud/ocis/pull/7670)
|
||||
|
||||
## Details
|
||||
@@ -213,12 +160,29 @@ The following sections list the changes for 5.0.0.
|
||||
https://github.com/owncloud/ocis/issues/7282
|
||||
https://github.com/owncloud/ocis/pull/7290
|
||||
|
||||
* Bugfix - Fix wrong compile date: [#6132](https://github.com/owncloud/ocis/pull/6132)
|
||||
|
||||
We fixed that current date is always printed.
|
||||
|
||||
https://github.com/owncloud/ocis/issues/6124
|
||||
https://github.com/owncloud/ocis/pull/6132
|
||||
|
||||
* Bugfix - Fix default language fallback: [#7465](https://github.com/owncloud/ocis/issues/7465)
|
||||
|
||||
Add the default language for the webui, the settings, userlog and notification service.
|
||||
|
||||
https://github.com/owncloud/ocis/issues/7465
|
||||
|
||||
* Bugfix - Disable DEPTH infinity in PROPFIND: [#7746](https://github.com/owncloud/ocis/pull/7746)
|
||||
|
||||
We fixed the Disabled DEPTH infinity in PROPFIND for: Personal /remote.php/dav/files/admin
|
||||
Public link share /remote.php/dav/public-files/<token> Trashbin
|
||||
/remote.php/dav/spaces/trash-bin/<personal-space-id>
|
||||
|
||||
https://github.com/owncloud/ocis/issues/7359
|
||||
https://github.com/owncloud/ocis/pull/7746
|
||||
https://github.com/cs3org/reva/pull/4278
|
||||
|
||||
* Bugfix - Fix 403 in docs pipeline: [#7509](https://github.com/owncloud/ocis/issues/7509)
|
||||
|
||||
Docs pipeline was not routed through our proxies which could lead to requests being
|
||||
@@ -288,6 +252,13 @@ The following sections list the changes for 5.0.0.
|
||||
|
||||
https://github.com/owncloud/ocis/issues/7345
|
||||
|
||||
* Bugfix - Fix search service start: [#7795](https://github.com/owncloud/ocis/pull/7795)
|
||||
|
||||
The `search` service would sometimes not start correctly because config values are
|
||||
overwritten by default configuration.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/7795
|
||||
|
||||
* Bugfix - Fix unlock via space API: [#7726](https://github.com/owncloud/ocis/pull/7726)
|
||||
|
||||
We fixed a bug that caused Error 500 when user try to unlock file using fileid The
|
||||
@@ -362,6 +333,21 @@ The following sections list the changes for 5.0.0.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/7138
|
||||
|
||||
* Enhancement - Add banned password list to the default deployments: [#7784](https://github.com/owncloud/ocis/pull/7784)
|
||||
|
||||
We add banned password list to the default deployments
|
||||
|
||||
https://github.com/owncloud/ocis/issues/7724
|
||||
https://github.com/owncloud/ocis/pull/7784
|
||||
|
||||
* Enhancement - Default link permission config: [#7783](https://github.com/owncloud/ocis/pull/7783)
|
||||
|
||||
A new config for default link permissions that is being announced via capabilities has been
|
||||
added. It defaults to 1 (= public link with viewer permissions).
|
||||
|
||||
https://github.com/owncloud/web/issues/9919
|
||||
https://github.com/owncloud/ocis/pull/7783
|
||||
|
||||
* Enhancement - Add search MediaType filter: [#7602](https://github.com/owncloud/ocis/pull/7602)
|
||||
|
||||
Add filter MediaType filter shortcuts to search for specific document types. For example, a
|
||||
@@ -457,12 +443,27 @@ The following sections list the changes for 5.0.0.
|
||||
https://github.com/owncloud/ocis/pull/7194
|
||||
https://github.com/cs3org/reva/pull/4147
|
||||
|
||||
* Enhancement - Add user filter startswith and contains: [#7739](https://github.com/owncloud/ocis/pull/7739)
|
||||
|
||||
We add two new filters to the user list endpoint. The `startswith` filter allows to filter users
|
||||
by the beginning of their name. The `contains` filter allows to filter users by a substring of
|
||||
their name.
|
||||
|
||||
https://github.com/owncloud/ocis/issues/5486
|
||||
https://github.com/owncloud/ocis/pull/7739
|
||||
|
||||
* Enhancement - Allow configuring additional routes: [#7740](https://github.com/owncloud/ocis/pull/7740)
|
||||
|
||||
Allows adding custom routes to the ocis proxy. This enables customs ocis extensions
|
||||
|
||||
https://github.com/owncloud/ocis/pull/7740
|
||||
|
||||
* Enhancement - Update to go 1.21: [#7794](https://github.com/owncloud/ocis/pull/7794)
|
||||
|
||||
We updated to go 1.21.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/7794
|
||||
|
||||
* Enhancement - Bump reva: [#7721](https://github.com/owncloud/ocis/pull/7721)
|
||||
|
||||
Bumps reva version
|
||||
@@ -541,6 +542,13 @@ The following sections list the changes for 5.0.0.
|
||||
https://github.com/owncloud/ocis/issues/6674
|
||||
https://github.com/owncloud/ocis/pull/7553
|
||||
|
||||
* Enhancement - Add Sharing NG list permissions endpoint: [#7805](https://github.com/owncloud/ocis/pull/7805)
|
||||
|
||||
We've added a new sharing ng endpoint which lists all permissions for a given item.
|
||||
|
||||
https://github.com/owncloud/ocis/issues/6993
|
||||
https://github.com/owncloud/ocis/pull/7805
|
||||
|
||||
* Enhancement - Add Sharing NG endpoints: [#7633](https://github.com/owncloud/ocis/pull/7633)
|
||||
|
||||
We've added new sharing ng endpoints to the graph beta api. The following endpoints are added:
|
||||
@@ -760,134 +768,166 @@ The following sections list the changes for 5.0.0.
|
||||
https://github.com/owncloud/web/issues/7728
|
||||
https://github.com/owncloud/ocis/pull/7409
|
||||
|
||||
* Enhancement - Update web to v8.0.0: [#7773](https://github.com/owncloud/ocis/pull/7773)
|
||||
* Enhancement - Update web to v8.0.0: [#7852](https://github.com/owncloud/ocis/pull/7852)
|
||||
|
||||
Tags: web
|
||||
|
||||
We updated ownCloud Web to v8.0.0. Please refer to the changelog (linked) for details on the web
|
||||
release.
|
||||
|
||||
## Summary * Bugfix [owncloud/web#9257](https://github.com/owncloud/web/issues/9257)
|
||||
- Filter out shares without display name * Bugfix
|
||||
[owncloud/web#9483](https://github.com/owncloud/web/issues/9483) - PDF loading
|
||||
Safari * Bugfix [owncloud/web#9513](https://github.com/owncloud/web/pull/9513) - Set
|
||||
## Summary * Bugfix
|
||||
[owncloud/web#9257](https://github.com/owncloud/web/issues/9257): Filter out shares
|
||||
without display name * Bugfix
|
||||
[owncloud/web#9483](https://github.com/owncloud/web/issues/9483): PDF loading
|
||||
Safari * Bugfix [owncloud/web#9513](https://github.com/owncloud/web/pull/9513): Set
|
||||
or remove expiration date on group share not possible * Bugfix
|
||||
[owncloud/web#9529](https://github.com/owncloud/web/pull/9529) - Shared with action
|
||||
[owncloud/web#9529](https://github.com/owncloud/web/pull/9529): Shared with action
|
||||
menu label alignment * Bugfix
|
||||
[owncloud/web#9587](https://github.com/owncloud/web/pull/9587) - Internal public
|
||||
[owncloud/web#9587](https://github.com/owncloud/web/pull/9587): Internal public
|
||||
link resolving * Bugfix
|
||||
[owncloud/web#9593](https://github.com/owncloud/web/issues/9593) - Audio- &
|
||||
[owncloud/web#9593](https://github.com/owncloud/web/issues/9593): Audio- &
|
||||
video-loading on Shared with me page * Bugfix
|
||||
[owncloud/web#9649](https://github.com/owncloud/web/pull/9649) - Add project space
|
||||
filter * Bugfix [owncloud/web#9663](https://github.com/owncloud/web/pull/9663) -
|
||||
[owncloud/web#9649](https://github.com/owncloud/web/pull/9649): Add project space
|
||||
filter * Bugfix [owncloud/web#9663](https://github.com/owncloud/web/pull/9663):
|
||||
Respect the open-in-new-tab-config for external apps * Bugfix
|
||||
[owncloud/web#9670](https://github.com/owncloud/web/pull/9670) - Tiles view
|
||||
[owncloud/web#9670](https://github.com/owncloud/web/pull/9670): Tiles view
|
||||
accessibility * Bugfix
|
||||
[owncloud/web#9694](https://github.com/owncloud/web/issues/9694) - Special
|
||||
[owncloud/web#9694](https://github.com/owncloud/web/issues/9694): Special
|
||||
characters in username * Bugfix
|
||||
[owncloud/web#9788](https://github.com/owncloud/web/issues/9788) - Create .space
|
||||
[owncloud/web#9788](https://github.com/owncloud/web/issues/9788): Create .space
|
||||
folder if it does not exist * Bugfix
|
||||
[owncloud/web#9799](https://github.com/owncloud/web/issues/9799) - Link resolving
|
||||
[owncloud/web#9799](https://github.com/owncloud/web/issues/9799): Link resolving
|
||||
into default app * Bugfix
|
||||
[owncloud/web#9832](https://github.com/owncloud/web/pull/9832) - Copy quicklinks for
|
||||
[owncloud/web#9832](https://github.com/owncloud/web/pull/9832): Copy quicklinks for
|
||||
webkit navigator * Bugfix
|
||||
[owncloud/web#9843](https://github.com/owncloud/web/pull/9843) - Fix display path on
|
||||
resources * Bugfix [owncloud/web#9844](https://github.com/owncloud/web/pull/9844) -
|
||||
[owncloud/web#9843](https://github.com/owncloud/web/pull/9843): Fix display path on
|
||||
resources * Bugfix [owncloud/web#9844](https://github.com/owncloud/web/pull/9844):
|
||||
Upload space image * Bugfix
|
||||
[owncloud/web#9861](https://github.com/owncloud/web/pull/9861) - Duplicated file
|
||||
[owncloud/web#9861](https://github.com/owncloud/web/pull/9861): Duplicated file
|
||||
search request * Bugfix
|
||||
[owncloud/web#9873](https://github.com/owncloud/web/pull/9873) - Tags are no longer
|
||||
[owncloud/web#9873](https://github.com/owncloud/web/pull/9873): Tags are no longer
|
||||
editable for a locked file * Bugfix
|
||||
[owncloud/web#9881](https://github.com/owncloud/web/pull/9881) - Prevent rendering
|
||||
[owncloud/web#9881](https://github.com/owncloud/web/pull/9881): Prevent rendering
|
||||
of old/wrong set of resources in search list * Bugfix
|
||||
[owncloud/web#9913](https://github.com/owncloud/web/pull/9913) - Private link
|
||||
resolving via share jail ID * Bugfix
|
||||
[owncloud/web#9915](https://github.com/owncloud/web/pull/9915) - Keep both folders
|
||||
conflict in same-named folders * Enhancement
|
||||
[owncloud/web#7317](https://github.com/owncloud/ocis/pull/7317) - Make login url
|
||||
[owncloud/web#9915](https://github.com/owncloud/web/pull/9915): Keep both folders
|
||||
conflict in same-named folders * Bugfix
|
||||
[owncloud/web#9931](https://github.com/owncloud/web/pull/9931): Enabling "invite
|
||||
people" for password-protected folder/file * Bugfix
|
||||
[owncloud/web#10031](https://github.com/owncloud/web/issues/10031): Icon extension
|
||||
mapping * Bugfix [owncloud/web#10065](https://github.com/owncloud/web/pull/10065):
|
||||
Logout page after token expiry * Bugfix
|
||||
[owncloud/web#10083](https://github.com/owncloud/web/pull/10083): Disable
|
||||
expiration date for alias link (internal) * Change
|
||||
[owncloud/web#7338](https://github.com/owncloud/web/issues/7338): Remove
|
||||
deprecated code * Enhancement
|
||||
[owncloud/web#7317](https://github.com/owncloud/ocis/pull/7317): Make login url
|
||||
configurable * Enhancement
|
||||
[owncloud/web#7497](https://github.com/owncloud/ocis/issues/7497) - Permission
|
||||
[owncloud/web#7497](https://github.com/owncloud/ocis/issues/7497): Permission
|
||||
checks for shares and favorites * Enhancement
|
||||
[owncloud/web#7600](https://github.com/owncloud/web/issues/7600) - Scroll to newly
|
||||
[owncloud/web#7600](https://github.com/owncloud/web/issues/7600): Scroll to newly
|
||||
created folder * Enhancement
|
||||
[owncloud/web#9302](https://github.com/owncloud/web/issues/9302) - Application
|
||||
[owncloud/web#9302](https://github.com/owncloud/web/issues/9302): Application
|
||||
unification * Enhancement
|
||||
[owncloud/web#9423](https://github.com/owncloud/web/pull/9423) - Show local loading
|
||||
[owncloud/web#9423](https://github.com/owncloud/web/pull/9423): Show local loading
|
||||
spinner in sharing button * Enhancement
|
||||
[owncloud/web#9441](https://github.com/owncloud/web/pull/9441) - File versions
|
||||
[owncloud/web#9441](https://github.com/owncloud/web/pull/9441): File versions
|
||||
tooltip with absolute date * Enhancement
|
||||
[owncloud/web#9441](https://github.com/owncloud/web/pull/9441) - Disabling
|
||||
[owncloud/web#9441](https://github.com/owncloud/web/pull/9441): Disabling
|
||||
extensions * Enhancement
|
||||
[owncloud/web#9451](https://github.com/owncloud/web/pull/9451) - Add SSE to get
|
||||
[owncloud/web#9451](https://github.com/owncloud/web/pull/9451): Add SSE to get
|
||||
notifications instantly * Enhancement
|
||||
[owncloud/web#9525](https://github.com/owncloud/web/pull/9525) - Tags form improved *
|
||||
Enhancement [owncloud/web#9527](https://github.com/owncloud/web/pull/9527) - Don't
|
||||
[owncloud/web#9525](https://github.com/owncloud/web/pull/9525): Tags form improved *
|
||||
Enhancement [owncloud/web#9527](https://github.com/owncloud/web/pull/9527): Don't
|
||||
display confirmation dialog on file deletion * Enhancement
|
||||
[owncloud/web#9531](https://github.com/owncloud/web/issues/9531) - Personal shares
|
||||
[owncloud/web#9531](https://github.com/owncloud/web/issues/9531): Personal shares
|
||||
can be shown and hidden * Enhancement
|
||||
[owncloud/web#9561](https://github.com/owncloud/web/pull/9561) - Indicate
|
||||
processing state * Enhancement
|
||||
[owncloud/web#9566](https://github.com/owncloud/web/pull/9566) - Display locking
|
||||
[owncloud/web#9552](https://github.com/owncloud/web/pull/9552): Upload preparation
|
||||
time * Enhancement [owncloud/web#9561](https://github.com/owncloud/web/pull/9561):
|
||||
Indicate processing state * Enhancement
|
||||
[owncloud/web#9566](https://github.com/owncloud/web/pull/9566): Display locking
|
||||
information * Enhancement
|
||||
[owncloud/web#9584](https://github.com/owncloud/web/pull/9584) - Moving share's "set
|
||||
[owncloud/web#9584](https://github.com/owncloud/web/pull/9584): Moving share's "set
|
||||
expiration date" function * Enhancement
|
||||
[owncloud/web#9625](https://github.com/owncloud/web/pull/9625) - Add keyboard
|
||||
[owncloud/web#9625](https://github.com/owncloud/web/pull/9625): Add keyboard
|
||||
navigation to spaces overview * Enhancement
|
||||
[owncloud/web#9627](https://github.com/owncloud/web/pull/9627) - Add batch actions to
|
||||
spaces * Enhancement [owncloud/web#9653](https://github.com/owncloud/web/pull/9653)
|
||||
- Keyword Query Language (KQL) search syntax * Enhancement
|
||||
[owncloud/web#9671](https://github.com/owncloud/web/pull/9671) - OcModal set buttons
|
||||
[owncloud/web#9627](https://github.com/owncloud/web/pull/9627): Add batch actions to
|
||||
spaces * Enhancement
|
||||
[owncloud/web#9653](https://github.com/owncloud/web/pull/9653): Keyword Query
|
||||
Language (KQL) search syntax * Enhancement
|
||||
[owncloud/web#9671](https://github.com/owncloud/web/pull/9671): OcModal set buttons
|
||||
to same width * Enhancement
|
||||
[owncloud/web#9682](https://github.com/owncloud/web/pull/9682) - Add password policy
|
||||
[owncloud/web#9682](https://github.com/owncloud/web/pull/9682): Add password policy
|
||||
compatibility * Enhancement
|
||||
[owncloud/web#9691](https://github.com/owncloud/web/pull/9691) - Password generator
|
||||
[owncloud/web#9691](https://github.com/owncloud/web/pull/9691): Password generator
|
||||
for public links * Enhancement
|
||||
[owncloud/web#9696](https://github.com/owncloud/web/pull/9696) - Added app banner for
|
||||
[owncloud/web#9696](https://github.com/owncloud/web/pull/9696): Added app banner for
|
||||
mobile devices * Enhancement
|
||||
[owncloud/web#9706](https://github.com/owncloud/web/pull/9706) - Unify sharing
|
||||
[owncloud/web#9706](https://github.com/owncloud/web/pull/9706): Unify sharing
|
||||
expiration date menu items * Enhancement
|
||||
[owncloud/web#9727](https://github.com/owncloud/web/pull/9727) - Show error if
|
||||
[owncloud/web#9727](https://github.com/owncloud/web/pull/9727): Show error if
|
||||
password is on a banned password list * Enhancement
|
||||
[owncloud/web#9771](https://github.com/owncloud/web/pull/9771) - Handle
|
||||
[owncloud/web#9771](https://github.com/owncloud/web/pull/9771): Handle
|
||||
postprocessing state via Server Sent Events * Enhancement
|
||||
[owncloud/web#9806](https://github.com/owncloud/web/pull/9806) - Preview image
|
||||
[owncloud/web#9806](https://github.com/owncloud/web/pull/9806): Preview image
|
||||
presentation * Enhancement
|
||||
[owncloud/web#9809](https://github.com/owncloud/web/pull/9809) - Add editors to the
|
||||
[owncloud/web#9809](https://github.com/owncloud/web/pull/9809): Add editors to the
|
||||
application menu * Enhancement
|
||||
[owncloud/web#9814](https://github.com/owncloud/web/pull/9814) - Registering nav
|
||||
[owncloud/web#9814](https://github.com/owncloud/web/pull/9814): Registering nav
|
||||
items as extension * Enhancement
|
||||
[owncloud/web#9815](https://github.com/owncloud/web/pull/9815) - Add new portal into
|
||||
[owncloud/web#9815](https://github.com/owncloud/web/pull/9815): Add new portal into
|
||||
runtime to include footer * Enhancement
|
||||
[owncloud/web#9818](https://github.com/owncloud/web/pull/9818) - Add `mode` config
|
||||
option * Enhancement [owncloud/web#9831](https://github.com/owncloud/web/pull/9831)
|
||||
- Last modified filter chips * Enhancement
|
||||
[owncloud/web#9841](https://github.com/owncloud/web/pull/9841) - Add embed mode
|
||||
[owncloud/web#9818](https://github.com/owncloud/web/pull/9818): Add `mode` config
|
||||
option * Enhancement
|
||||
[owncloud/web#9831](https://github.com/owncloud/web/pull/9831): Last modified
|
||||
filter chips * Enhancement
|
||||
[owncloud/web#9841](https://github.com/owncloud/web/pull/9841): Add embed mode
|
||||
actions * Enhancement
|
||||
[owncloud/web#9853](https://github.com/owncloud/web/pull/9853) - Show only create
|
||||
[owncloud/web#9847](https://github.com/owncloud/web/issues/9847): Provide vendor
|
||||
neutral file icons * Enhancement
|
||||
[owncloud/web#9853](https://github.com/owncloud/web/pull/9853): Show only create
|
||||
folder button in embed mode * Enhancement
|
||||
[owncloud/web#9854](https://github.com/owncloud/web/pull/9854) - Search query term
|
||||
[owncloud/web#9854](https://github.com/owncloud/web/pull/9854): Search query term
|
||||
linking * Enhancement
|
||||
[owncloud/web#9857](https://github.com/owncloud/web/pull/9857) - Add permission to
|
||||
[owncloud/web#9857](https://github.com/owncloud/web/pull/9857): Add permission to
|
||||
delete link passwords when password is enforced * Enhancement
|
||||
[owncloud/web#9858](https://github.com/owncloud/web/pull/9858) - Remove settings
|
||||
[owncloud/web#9858](https://github.com/owncloud/web/pull/9858): Remove settings
|
||||
icon from searchbar * Enhancement
|
||||
[owncloud/web#9863](https://github.com/owncloud/web/pull/9863) - Location picker in
|
||||
[owncloud/web#9863](https://github.com/owncloud/web/pull/9863): Location picker in
|
||||
embed mode * Enhancement
|
||||
[owncloud/web#9864](https://github.com/owncloud/web/pull/9864) - Search tags filter
|
||||
[owncloud/web#9864](https://github.com/owncloud/web/pull/9864): Search tags filter
|
||||
chips style aligned * Enhancement
|
||||
[owncloud/web#9884](https://github.com/owncloud/web/pull/9884) - Enable dark theme on
|
||||
[owncloud/web#9884](https://github.com/owncloud/web/pull/9884): Enable dark theme on
|
||||
importer * Enhancement
|
||||
[owncloud/web#9890](https://github.com/owncloud/web/pull/9890) - Create shortcuts *
|
||||
Enhancement [owncloud/web#9905](https://github.com/owncloud/web/pull/9905) - Manage
|
||||
[owncloud/web#9890](https://github.com/owncloud/web/pull/9890): Create shortcuts *
|
||||
Enhancement [owncloud/web#9905](https://github.com/owncloud/web/pull/9905): Manage
|
||||
tags in details panel * Enhancement
|
||||
[owncloud/web#9906](https://github.com/owncloud/web/pull/9906) - Reorganize "New"
|
||||
menu * Enhancement [owncloud/web#9911](https://github.com/owncloud/web/pull/9911) -
|
||||
Provide vendor neutral file icons * Enhancement
|
||||
[owncloud/web#9912](https://github.com/owncloud/web/pull/9912) - Add media type
|
||||
filter chip
|
||||
[owncloud/web#9906](https://github.com/owncloud/web/pull/9906): Reorganize "New"
|
||||
menu * Enhancement [owncloud/web#9912](https://github.com/owncloud/web/pull/9912):
|
||||
Add media type filter chip * Enhancement
|
||||
[owncloud/web#9940](https://github.com/owncloud/web/pull/9940): Display error
|
||||
message for upload to locked folder * Enhancement
|
||||
[owncloud/web#9966](https://github.com/owncloud/web/issues/9966): Support more
|
||||
audio formats with correct icon * Enhancement
|
||||
[owncloud/web#10007](https://github.com/owncloud/web/issues/10007): Additional
|
||||
languages * Enhancement
|
||||
[owncloud/web#10013](https://github.com/owncloud/web/issues/10013): Shared by
|
||||
filter * Enhancement
|
||||
[owncloud/web#10014](https://github.com/owncloud/web/issues/10014): Share search
|
||||
filter * Enhancement
|
||||
[owncloud/web#10024](https://github.com/owncloud/web/pull/10024): Duplicate space *
|
||||
Enhancement [owncloud/web#10037](https://github.com/owncloud/web/pull/10037):
|
||||
Default link permission * Enhancement
|
||||
[owncloud/web#10047](https://github.com/owncloud/web/pull/10047): Add explaining
|
||||
contextual helper to spaces overview * Enhancement
|
||||
[owncloud/web#10057](https://github.com/owncloud/web/pull/10057): Folder tree
|
||||
creation during upload * Enhancement
|
||||
[owncloud/web#10062](https://github.com/owncloud/web/pull/10062): Show webdav
|
||||
information in details view * Enhancement
|
||||
[owncloud/web#10082](https://github.com/owncloud/web/pull/10082): Add
|
||||
authentication delegation in the Embed mode
|
||||
|
||||
https://github.com/owncloud/ocis/pull/7773
|
||||
https://github.com/owncloud/web/releases/tag/v8.0.0-alpha.10
|
||||
https://github.com/owncloud/ocis/pull/7852
|
||||
https://github.com/owncloud/web/releases/tag/v8.0.0-alpha.11
|
||||
|
||||
* Enhancement - Configs for Web embed mode: [#7670](https://github.com/owncloud/ocis/pull/7670)
|
||||
|
||||
@@ -896,6 +936,8 @@ The following sections list the changes for 5.0.0.
|
||||
* `enabled` Defines if embed mode is enabled.
|
||||
* `target` Defines how Web is being integrated when running in embed mode.
|
||||
* `messagesOrigin` Defines a URL under which Web can be integrated via iFrame.
|
||||
* `delegateAuthentication` Defines whether Web should require authentication to be done by the parent application.
|
||||
* `delegateAuthenticationOrigin` Defines the host to validate the message event origin against when running Web in 'embed' mode.
|
||||
|
||||
https://github.com/owncloud/web/issues/9768
|
||||
https://github.com/owncloud/ocis/pull/7670
|
||||
@@ -5892,7 +5934,7 @@ The following sections list the changes for 2.0.0.
|
||||
|
||||
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
|
||||
|
||||
@@ -6061,29 +6103,11 @@ The following sections list the changes for 1.20.0.
|
||||
|
||||
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
|
||||
|
||||
@@ -6253,6 +6277,24 @@ The following sections list the changes for 1.19.0.
|
||||
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.
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,5 @@
|
||||
Enhancement: Add user list requires filter config
|
||||
|
||||
Introduce a config to require filters in order to list users in Web via `WEB_OPTION_USER_LIST_REQUIRES_FILTER`.
|
||||
|
||||
https://github.com/owncloud/ocis/pull/7866
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+9
-5
@@ -1,8 +1,8 @@
|
||||
Enhancement: Update web to v8.0.0
|
||||
Enhancement: Update web to v8.0.0-alpha.12
|
||||
|
||||
Tags: web
|
||||
|
||||
We updated ownCloud Web to v8.0.0. Please refer to the changelog (linked) for details on the web release.
|
||||
We updated ownCloud Web to v8.0.0-alpha.12. Please refer to the changelog (linked) for details on the web release.
|
||||
|
||||
## Summary
|
||||
* Bugfix [owncloud/web#9257](https://github.com/owncloud/web/issues/9257): Filter out shares without display name
|
||||
@@ -28,6 +28,8 @@ We updated ownCloud Web to v8.0.0. Please refer to the changelog (linked) for de
|
||||
* Bugfix [owncloud/web#10031](https://github.com/owncloud/web/issues/10031): Icon extension mapping
|
||||
* Bugfix [owncloud/web#10065](https://github.com/owncloud/web/pull/10065): Logout page after token expiry
|
||||
* Bugfix [owncloud/web#10083](https://github.com/owncloud/web/pull/10083): Disable expiration date for alias link (internal)
|
||||
* Bugfix [owncloud/web#10092](https://github.com/owncloud/web/pull/10092): Allow empty search query in "in-here" search
|
||||
* Bugfix [owncloud/web#10096](https://github.com/owncloud/web/pull/10096): Remove password buttons on input if disabled
|
||||
* Change [owncloud/web#7338](https://github.com/owncloud/web/issues/7338): Remove deprecated code
|
||||
* Enhancement [owncloud/web#7317](https://github.com/owncloud/ocis/pull/7317): Make login url configurable
|
||||
* Enhancement [owncloud/web#7497](https://github.com/owncloud/ocis/issues/7497): Permission checks for shares and favorites
|
||||
@@ -83,7 +85,9 @@ We updated ownCloud Web to v8.0.0. Please refer to the changelog (linked) for de
|
||||
* Enhancement [owncloud/web#10047](https://github.com/owncloud/web/pull/10047): Add explaining contextual helper to spaces overview
|
||||
* Enhancement [owncloud/web#10057](https://github.com/owncloud/web/pull/10057): Folder tree creation during upload
|
||||
* Enhancement [owncloud/web#10062](https://github.com/owncloud/web/pull/10062): Show webdav information in details view
|
||||
* Enhancement [owncloud/web#10082](https://github.com/owncloud/web/pull/10082): Add authentication delegation in the Embed mode
|
||||
* Enhancement [owncloud/web#10072](https://github.com/owncloud/web/issues/10072): Add authentication delegation in the Embed mode
|
||||
* Enhancement [owncloud/web#10099](https://github.com/owncloud/web/pull/10099): Support mandatory filter while listing users
|
||||
* Enhancement [owncloud/web#10102](https://github.com/owncloud/web/pull/10102): Registering quick actions as extension
|
||||
|
||||
https://github.com/owncloud/ocis/pull/7852
|
||||
https://github.com/owncloud/web/releases/tag/v8.0.0-alpha.11
|
||||
https://github.com/owncloud/ocis/pull/7883
|
||||
https://github.com/owncloud/web/releases/tag/v8.0.0-alpha.12
|
||||
File renamed without changes.
@@ -0,0 +1,63 @@
|
||||
{
|
||||
"clientId": "3keLfua0olYvW1zKXTDB3OjAMPEYWEQNuiscli395GKJOiPnPURNQWGvGCJZf4Hw",
|
||||
"name": "Cyberduck",
|
||||
"surrogateAuthRequired": false,
|
||||
"enabled": true,
|
||||
"alwaysDisplayInConsole": false,
|
||||
"clientAuthenticatorType": "client-secret",
|
||||
"secret" : "yoqICbLIeYbpZPqDH4D8k4NKb04HqnrWBntEeVZEQ5gO1RmaUlln0Aqu1dj2UoF4",
|
||||
"redirectUris": [
|
||||
"x-cyberduck-action:oauth",
|
||||
"x-mountainduck-action:oauth"
|
||||
],
|
||||
"webOrigins": [],
|
||||
"notBefore": 0,
|
||||
"bearerOnly": false,
|
||||
"consentRequired": false,
|
||||
"standardFlowEnabled": true,
|
||||
"implicitFlowEnabled": false,
|
||||
"directAccessGrantsEnabled": true,
|
||||
"serviceAccountsEnabled": false,
|
||||
"publicClient": false,
|
||||
"frontchannelLogout": false,
|
||||
"protocol": "openid-connect",
|
||||
"attributes": {
|
||||
"saml.assertion.signature": "false",
|
||||
"saml.force.post.binding": "false",
|
||||
"saml.multivalued.roles": "false",
|
||||
"saml.encrypt": "false",
|
||||
"backchannel.logout.revoke.offline.tokens": "false",
|
||||
"saml.server.signature": "false",
|
||||
"saml.server.signature.keyinfo.ext": "false",
|
||||
"exclude.session.state.from.auth.response": "false",
|
||||
"backchannel.logout.session.required": "true",
|
||||
"client_credentials.use_refresh_token": "false",
|
||||
"saml_force_name_id_format": "false",
|
||||
"saml.client.signature": "false",
|
||||
"tls.client.certificate.bound.access.tokens": "false",
|
||||
"saml.authnstatement": "false",
|
||||
"display.on.consent.screen": "false",
|
||||
"saml.onetimeuse.condition": "false"
|
||||
},
|
||||
"authenticationFlowBindingOverrides": {},
|
||||
"fullScopeAllowed": true,
|
||||
"nodeReRegistrationTimeout": -1,
|
||||
"defaultClientScopes": [
|
||||
"web-origins",
|
||||
"role_list",
|
||||
"profile",
|
||||
"roles",
|
||||
"email"
|
||||
],
|
||||
"optionalClientScopes": [
|
||||
"address",
|
||||
"phone",
|
||||
"offline_access",
|
||||
"microprofile-jwt"
|
||||
],
|
||||
"access": {
|
||||
"view": true,
|
||||
"configure": true,
|
||||
"manage": true
|
||||
}
|
||||
}
|
||||
@@ -11,9 +11,9 @@ require (
|
||||
github.com/bbalet/stopwords v1.0.0
|
||||
github.com/blevesearch/bleve/v2 v2.3.10
|
||||
github.com/coreos/go-oidc v2.2.1+incompatible
|
||||
github.com/coreos/go-oidc/v3 v3.7.0
|
||||
github.com/coreos/go-oidc/v3 v3.8.0
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20231023073225-7748710e0781
|
||||
github.com/cs3org/reva/v2 v2.16.1-0.20231127154323-1e3027b83df5
|
||||
github.com/cs3org/reva/v2 v2.16.1-0.20231201122033-a389ddc645c4
|
||||
github.com/dhowden/tag v0.0.0-20230630033851-978a0926ee25
|
||||
github.com/disintegration/imaging v1.6.2
|
||||
github.com/dutchcoders/go-clamd v0.0.0-20170520113014-b970184f4d9e
|
||||
@@ -56,7 +56,7 @@ require (
|
||||
github.com/justinas/alice v1.2.0
|
||||
github.com/leonelquinteros/gotext v1.5.3-0.20230317130943-71a59c05b2c1
|
||||
github.com/libregraph/idm v0.4.1-0.20230221143410-3503963047a5
|
||||
github.com/libregraph/lico v0.60.1-0.20230811070109-1d4140be554d
|
||||
github.com/libregraph/lico v0.61.1
|
||||
github.com/mitchellh/mapstructure v1.5.0
|
||||
github.com/mna/pigeon v1.2.1
|
||||
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826
|
||||
@@ -66,7 +66,7 @@ require (
|
||||
github.com/onsi/ginkgo v1.16.5
|
||||
github.com/onsi/ginkgo/v2 v2.13.0
|
||||
github.com/onsi/gomega v1.29.0
|
||||
github.com/open-policy-agent/opa v0.51.0
|
||||
github.com/open-policy-agent/opa v0.59.0
|
||||
github.com/orcaman/concurrent-map v1.0.0
|
||||
github.com/owncloud/libre-graph-api-go v1.0.5-0.20231128074031-fdcdb2371356
|
||||
github.com/pkg/errors v0.9.1
|
||||
@@ -117,7 +117,7 @@ require (
|
||||
github.com/BurntSushi/toml v1.3.2 // indirect
|
||||
github.com/Masterminds/goutils v1.1.1 // indirect
|
||||
github.com/Masterminds/sprig v2.22.0+incompatible // indirect
|
||||
github.com/Microsoft/go-winio v0.6.0 // indirect
|
||||
github.com/Microsoft/go-winio v0.6.1 // indirect
|
||||
github.com/OneOfOne/xxhash v1.2.8 // indirect
|
||||
github.com/ProtonMail/go-crypto v0.0.0-20220930113650-c6815a8c17ad // indirect
|
||||
github.com/RoaringBitmap/roaring v1.2.3 // indirect
|
||||
@@ -159,7 +159,7 @@ require (
|
||||
github.com/cevaris/ordered_map v0.0.0-20190319150403-3adeae072e73 // indirect
|
||||
github.com/cilium/ebpf v0.9.1 // indirect
|
||||
github.com/cloudflare/circl v1.3.3 // indirect
|
||||
github.com/containerd/cgroups/v3 v3.0.1 // indirect
|
||||
github.com/containerd/cgroups/v3 v3.0.2 // indirect
|
||||
github.com/coreos/go-semver v0.3.0 // indirect
|
||||
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect
|
||||
@@ -171,7 +171,7 @@ require (
|
||||
github.com/dgraph-io/ristretto v0.1.1 // indirect
|
||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
||||
github.com/dlclark/regexp2 v1.4.0 // indirect
|
||||
github.com/docker/go-units v0.4.0 // indirect
|
||||
github.com/docker/go-units v0.5.0 // indirect
|
||||
github.com/dustin/go-humanize v1.0.1 // indirect
|
||||
github.com/egirna/icap v0.0.0-20181108071049-d5ee18bd70bc // indirect
|
||||
github.com/emirpasic/gods v1.18.1 // indirect
|
||||
@@ -179,14 +179,14 @@ require (
|
||||
github.com/evanphx/json-patch/v5 v5.5.0 // indirect
|
||||
github.com/fatih/color v1.14.1 // indirect
|
||||
github.com/felixge/httpsnoop v1.0.4 // indirect
|
||||
github.com/fsnotify/fsnotify v1.6.0 // indirect
|
||||
github.com/fsnotify/fsnotify v1.7.0 // indirect
|
||||
github.com/gdexlab/go-render v1.0.1 // indirect
|
||||
github.com/ghodss/yaml v1.0.0 // indirect
|
||||
github.com/go-acme/lego/v4 v4.4.0 // indirect
|
||||
github.com/go-asn1-ber/asn1-ber v1.5.5 // indirect
|
||||
github.com/go-git/gcfg v1.5.0 // indirect
|
||||
github.com/go-git/go-billy/v5 v5.3.1 // indirect
|
||||
github.com/go-git/go-git/v5 v5.4.2 // indirect
|
||||
github.com/go-ini/ini v1.67.0 // indirect
|
||||
github.com/go-jose/go-jose/v3 v3.0.1 // indirect
|
||||
github.com/go-kit/log v0.2.1 // indirect
|
||||
github.com/go-logfmt/logfmt v0.5.1 // indirect
|
||||
@@ -206,7 +206,7 @@ require (
|
||||
github.com/gobwas/pool v0.2.1 // indirect
|
||||
github.com/gobwas/ws v1.0.4 // indirect
|
||||
github.com/goccy/go-yaml v1.11.2 // indirect
|
||||
github.com/godbus/dbus/v5 v5.0.6 // indirect
|
||||
github.com/godbus/dbus/v5 v5.1.0 // indirect
|
||||
github.com/gofrs/flock v0.8.1 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
|
||||
@@ -277,7 +277,7 @@ require (
|
||||
github.com/nats-io/nkeys v0.4.6 // indirect
|
||||
github.com/nats-io/nuid v1.0.1 // indirect
|
||||
github.com/nxadm/tail v1.4.8 // indirect
|
||||
github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 // indirect
|
||||
github.com/opencontainers/runtime-spec v1.1.0-rc.1 // indirect
|
||||
github.com/opentracing/opentracing-go v1.2.0 // indirect
|
||||
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c // indirect
|
||||
github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
|
||||
@@ -290,7 +290,7 @@ require (
|
||||
github.com/prometheus/statsd_exporter v0.22.8 // indirect
|
||||
github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 // indirect
|
||||
github.com/rivo/uniseg v0.4.2 // indirect
|
||||
github.com/rs/cors v1.9.0 // indirect
|
||||
github.com/rs/cors v1.10.1 // indirect
|
||||
github.com/rs/xid v1.5.0 // indirect
|
||||
github.com/russellhaering/goxmldsig v1.4.0 // indirect
|
||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||
@@ -315,7 +315,7 @@ require (
|
||||
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
|
||||
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
|
||||
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
|
||||
github.com/yashtewari/glob-intersection v0.1.0 // indirect
|
||||
github.com/yashtewari/glob-intersection v0.2.0 // indirect
|
||||
go.etcd.io/etcd/api/v3 v3.5.7 // indirect
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.5.7 // indirect
|
||||
go.etcd.io/etcd/client/v3 v3.5.7 // indirect
|
||||
@@ -331,7 +331,7 @@ require (
|
||||
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
|
||||
golang.org/x/mod v0.13.0 // indirect
|
||||
golang.org/x/sys v0.15.0 // indirect
|
||||
golang.org/x/time v0.4.0 // indirect
|
||||
golang.org/x/time v0.5.0 // indirect
|
||||
golang.org/x/tools v0.14.0 // indirect
|
||||
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
|
||||
google.golang.org/appengine v1.6.8 // indirect
|
||||
@@ -342,7 +342,7 @@ require (
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
|
||||
gopkg.in/warnings.v0 v0.1.2 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
sigs.k8s.io/yaml v1.3.0 // indirect
|
||||
sigs.k8s.io/yaml v1.4.0 // indirect
|
||||
)
|
||||
|
||||
replace github.com/go-micro/plugins/v4/store/nats-js => github.com/kobergj/plugins/v4/store/nats-js v1.2.1-0.20231020092801-9463c820c19a
|
||||
@@ -810,8 +810,8 @@ github.com/MicahParks/keyfunc v1.9.0/go.mod h1:IdnCilugA0O/99dW+/MkvlyrsX8+L8+x9
|
||||
github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA=
|
||||
github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0=
|
||||
github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY=
|
||||
github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg=
|
||||
github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE=
|
||||
github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
|
||||
github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=
|
||||
github.com/Nerzal/gocloak/v13 v13.8.0 h1:7s9cK8X3vy8OIic+pG4POE9vGy02tSHkMhvWXv0P2m8=
|
||||
github.com/Nerzal/gocloak/v13 v13.8.0/go.mod h1:rRBtEdh5N0+JlZZEsrfZcB2sRMZWbgSxI2EIv9jpJp4=
|
||||
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
|
||||
@@ -991,14 +991,14 @@ github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWH
|
||||
github.com/cncf/xds/go v0.0.0-20230310173818-32f1caf87195/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k=
|
||||
github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/containerd/cgroups/v3 v3.0.1 h1:4hfGvu8rfGIwVIDd+nLzn/B9ZXx4BcCjzt5ToenJRaE=
|
||||
github.com/containerd/cgroups/v3 v3.0.1/go.mod h1:/vtwk1VXrtoa5AaZLkypuOJgA/6DyPMZHJPGQNtlHnw=
|
||||
github.com/containerd/cgroups/v3 v3.0.2 h1:f5WFqIVSgo5IZmtTT3qVBo6TzI1ON6sycSBKkymb9L0=
|
||||
github.com/containerd/cgroups/v3 v3.0.2/go.mod h1:JUgITrzdFqp42uI2ryGA+ge0ap/nxzYgkGmIcetmErE=
|
||||
github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
|
||||
github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
||||
github.com/coreos/go-oidc v2.2.1+incompatible h1:mh48q/BqXqgjVHpy2ZY7WnWAbenxRjsz9N1i1YxjHAk=
|
||||
github.com/coreos/go-oidc v2.2.1+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc=
|
||||
github.com/coreos/go-oidc/v3 v3.7.0 h1:FTdj0uexT4diYIPlF4yoFVI5MRO1r5+SEcIpEw9vC0o=
|
||||
github.com/coreos/go-oidc/v3 v3.7.0/go.mod h1:yQzSCqBnK3e6Fs5l+f5i0F8Kwf0zpH9bPEsbY00KanM=
|
||||
github.com/coreos/go-oidc/v3 v3.8.0 h1:s3e30r6VEl3/M7DTSCEuImmrfu1/1WBgA0cXkdzkrAY=
|
||||
github.com/coreos/go-oidc/v3 v3.8.0/go.mod h1:yQzSCqBnK3e6Fs5l+f5i0F8Kwf0zpH9bPEsbY00KanM=
|
||||
github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM=
|
||||
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
||||
@@ -1017,8 +1017,8 @@ github.com/crewjam/saml v0.4.14 h1:g9FBNx62osKusnFzs3QTN5L9CVA/Egfgm+stJShzw/c=
|
||||
github.com/crewjam/saml v0.4.14/go.mod h1:UVSZCf18jJkk6GpWNVqcyQJMD5HsRugBPf4I1nl2mME=
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20231023073225-7748710e0781 h1:BUdwkIlf8IS2FasrrPg8gGPHQPOrQ18MS1Oew2tmGtY=
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20231023073225-7748710e0781/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY=
|
||||
github.com/cs3org/reva/v2 v2.16.1-0.20231127154323-1e3027b83df5 h1:+R3E25HVI3Ms9fzgPy8QNkby3u8x7oKpRerB/A9l5iM=
|
||||
github.com/cs3org/reva/v2 v2.16.1-0.20231127154323-1e3027b83df5/go.mod h1:zcrrYVsBv/DwhpyO2/W5hoSZ/k6az6Z2EYQok65uqZY=
|
||||
github.com/cs3org/reva/v2 v2.16.1-0.20231201122033-a389ddc645c4 h1:61AwMfov2OxrUElWXXKHZfBsuxgNIVwZVQW4PlJoqnM=
|
||||
github.com/cs3org/reva/v2 v2.16.1-0.20231201122033-a389ddc645c4/go.mod h1:zcrrYVsBv/DwhpyO2/W5hoSZ/k6az6Z2EYQok65uqZY=
|
||||
github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
@@ -1050,8 +1050,8 @@ github.com/dlclark/regexp2 v1.4.0 h1:F1rxgk7p4uKjwIQxBs9oAXe5CqrXlCduYEJvrF4u93E
|
||||
github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
|
||||
github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
|
||||
github.com/dnsimple/dnsimple-go v0.63.0/go.mod h1:O5TJ0/U6r7AfT8niYNlmohpLbCSG+c71tQlGr9SeGrg=
|
||||
github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw=
|
||||
github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
|
||||
github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
|
||||
github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
|
||||
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE=
|
||||
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
||||
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
|
||||
@@ -1114,8 +1114,8 @@ github.com/frankban/quicktest v1.14.0 h1:+cqqvzZV87b4adx/5ayVOaYZ2CrvM4ejQvUdBzP
|
||||
github.com/frankban/quicktest v1.14.0/go.mod h1:NeW+ay9A/U67EYXNFA1nPE8e/tnQv/09mUdL/ijj8og=
|
||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
|
||||
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
|
||||
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
|
||||
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
|
||||
github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0=
|
||||
github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk=
|
||||
github.com/gdexlab/go-render v1.0.1 h1:rxqB3vo5s4n1kF0ySmoNeSPRYkEsyHgln4jFIQY7v0U=
|
||||
@@ -1123,7 +1123,6 @@ github.com/gdexlab/go-render v1.0.1/go.mod h1:wRi5nW2qfjiGj4mPukH4UV0IknS1cHD4Vg
|
||||
github.com/getkin/kin-openapi v0.13.0/go.mod h1:WGRs2ZMM1Q8LR1QBEwUxC6RJEfaBcD0s+pcEVXFuAjw=
|
||||
github.com/ggwhite/go-masker v1.0.9 h1:9mKJzhLwJN1E5ekqNMk2ppP9ntWubIGtrUNV9wRouZo=
|
||||
github.com/ggwhite/go-masker v1.0.9/go.mod h1:xnTRHwrIU9FtBADwEjUC5Dy/BVedvoTxyOE7/d3CNwY=
|
||||
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
|
||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0=
|
||||
github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0=
|
||||
@@ -1160,6 +1159,8 @@ github.com/go-git/go-git/v5 v5.4.2/go.mod h1:gQ1kArt6d+n+BGd+/B/I74HwRTLhth2+zti
|
||||
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
|
||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
|
||||
github.com/go-ini/ini v1.67.0 h1:z6ZrTEZqSWOTyH2FlglNbNgARyHG8oLW9gMELqKr06A=
|
||||
github.com/go-ini/ini v1.67.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
|
||||
github.com/go-jose/go-jose/v3 v3.0.1 h1:pWmKFVtt+Jl0vBZTIpz/eAKwsm6LkIxDVVbFHKkchhA=
|
||||
github.com/go-jose/go-jose/v3 v3.0.1/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8=
|
||||
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||
@@ -1258,8 +1259,8 @@ github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MG
|
||||
github.com/goccy/go-yaml v1.11.2 h1:joq77SxuyIs9zzxEjgyLBugMQ9NEgTWxXfz2wVqwAaQ=
|
||||
github.com/goccy/go-yaml v1.11.2/go.mod h1:wKnAMd44+9JAAnGQpWVEgBzGt3YuTaQ4uXoHvE4m7WU=
|
||||
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
||||
github.com/godbus/dbus/v5 v5.0.6 h1:mkgN1ofwASrYnJ5W6U/BxG15eXXXjirgZc7CLqkcaro=
|
||||
github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
||||
github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk=
|
||||
github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
||||
github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw=
|
||||
github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU=
|
||||
github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
|
||||
@@ -1618,8 +1619,8 @@ github.com/leonelquinteros/gotext v1.5.3-0.20230317130943-71a59c05b2c1 h1:k56sFO
|
||||
github.com/leonelquinteros/gotext v1.5.3-0.20230317130943-71a59c05b2c1/go.mod h1:AT4NpQrOmyj1L/+hLja6aR0lk81yYYL4ePnj2kp7d6M=
|
||||
github.com/libregraph/idm v0.4.1-0.20230221143410-3503963047a5 h1:brLMXSjWoWhGXs8LpK+Lx+FQCtGLUa51Mq/ggHv9AV0=
|
||||
github.com/libregraph/idm v0.4.1-0.20230221143410-3503963047a5/go.mod h1:Tnm4pyVJTEbHm3GUNmceWT1DHzdrYqrJmZyt/xh7L+A=
|
||||
github.com/libregraph/lico v0.60.1-0.20230811070109-1d4140be554d h1:ukYcazYg31ipU6emsMKAdxYZT9o78T9ypQ1f7ThbcyQ=
|
||||
github.com/libregraph/lico v0.60.1-0.20230811070109-1d4140be554d/go.mod h1:RLIfwh3pIE27Sbe/aBHlaZEE6j11Fvg7xAGHnNqGt+U=
|
||||
github.com/libregraph/lico v0.61.1 h1:md5z939Fq3pUuRWNA0M2y8F7xel+XWgp9vCXwMih8mQ=
|
||||
github.com/libregraph/lico v0.61.1/go.mod h1:pnRet4pexWmy6rAB2fLAlEU885ShDIJhbjbuekDSlMU=
|
||||
github.com/libregraph/oidc-go v1.0.0 h1:l2tE/EwLyLXVy0B5BuVKgIFX9pNpz/5J3x5IBw0KEhc=
|
||||
github.com/libregraph/oidc-go v1.0.0/go.mod h1:7TRHrY/H1Vg6JqFjV0oAe1+kN+mGFBqXYvclSyvhRyc=
|
||||
github.com/linode/linodego v0.25.3/go.mod h1:GSBKPpjoQfxEfryoCRcgkuUOCuVtGHWhzI8OMdycNTE=
|
||||
@@ -1777,10 +1778,10 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J
|
||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
||||
github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg=
|
||||
github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ=
|
||||
github.com/open-policy-agent/opa v0.51.0 h1:2hS5xhos8HtkN+mgpqMhNJSFtn/1n/h3wh+AeTPJg6Q=
|
||||
github.com/open-policy-agent/opa v0.51.0/go.mod h1:OjmwLfXdeR7skSxrt8Yd3ScXTqPxyJn7GeTRJrcEerU=
|
||||
github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 h1:3snG66yBm59tKhhSPQrQ/0bCrv1LQbKt40LnUPiUxdc=
|
||||
github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
|
||||
github.com/open-policy-agent/opa v0.59.0 h1:1WFU/KUhJAr3qatm0Lf8Ea5jp10ZmlE2M07oaLiHypg=
|
||||
github.com/open-policy-agent/opa v0.59.0/go.mod h1:rdJSkEc4oQ+0074/3Fsgno5bkPsYxTjU5aLNmMujIvI=
|
||||
github.com/opencontainers/runtime-spec v1.1.0-rc.1 h1:wHa9jroFfKGQqFHj0I1fMRKLl0pfj+ynAqBxo3v6u9w=
|
||||
github.com/opencontainers/runtime-spec v1.1.0-rc.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
|
||||
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
|
||||
github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs=
|
||||
github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
|
||||
@@ -1904,8 +1905,8 @@ github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6po
|
||||
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
|
||||
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
|
||||
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
|
||||
github.com/rs/cors v1.9.0 h1:l9HGsTsHJcvW14Nk7J9KFz8bzeAWXn3CG6bgt7LsrAE=
|
||||
github.com/rs/cors v1.9.0/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU=
|
||||
github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo=
|
||||
github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU=
|
||||
github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc=
|
||||
github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
|
||||
github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A=
|
||||
@@ -2053,8 +2054,8 @@ github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavM
|
||||
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM=
|
||||
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU=
|
||||
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=
|
||||
github.com/yashtewari/glob-intersection v0.1.0 h1:6gJvMYQlTDOL3dMsPF6J0+26vwX9MB8/1q3uAdhmTrg=
|
||||
github.com/yashtewari/glob-intersection v0.1.0/go.mod h1:LK7pIC3piUjovexikBbJ26Yml7g8xa5bsjfx2v1fwok=
|
||||
github.com/yashtewari/glob-intersection v0.2.0 h1:8iuHdN88yYuCzCdjt0gDe+6bAhUwBeEWqThExu54RFg=
|
||||
github.com/yashtewari/glob-intersection v0.2.0/go.mod h1:LK7pIC3piUjovexikBbJ26Yml7g8xa5bsjfx2v1fwok=
|
||||
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
@@ -2485,7 +2486,6 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220829200755-d48e67d00261/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
@@ -2549,8 +2549,8 @@ golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxb
|
||||
golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.4.0 h1:Z81tqI5ddIoXDPvVQ7/7CC9TnLM7ubaFG2qXYd5BbYY=
|
||||
golang.org/x/time v0.4.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
|
||||
golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
|
||||
golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
|
||||
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
@@ -3072,8 +3072,8 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8
|
||||
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
|
||||
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
|
||||
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
|
||||
sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
|
||||
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
|
||||
sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E=
|
||||
sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY=
|
||||
stash.kopano.io/kgol/oidc-go v0.3.4 h1:pWANXF8gCPn6w+bowuWrOtmUueCyS70xLd4I8DbnIYs=
|
||||
stash.kopano.io/kgol/oidc-go v0.3.4/go.mod h1:roVKz8FVmPcdL4pUu+Gzk+GH2kOhz1UvnuMNTkjHyH8=
|
||||
stash.kopano.io/kgol/rndm v1.1.2 h1:vriNehb5NuglfGqZPkgeFr2Y5AjXtQCF4vEl4kqc6nc=
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
package oidc
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
)
|
||||
|
||||
const (
|
||||
Iss = "iss"
|
||||
Sub = "sub"
|
||||
@@ -12,3 +17,60 @@ const (
|
||||
OwncloudUUID = "ownclouduuid"
|
||||
OcisRoutingPolicy = "ocis.routing.policy"
|
||||
)
|
||||
|
||||
// SplitWithEscaping splits s into segments using separator which can be escaped using the escape string
|
||||
// See https://codereview.stackexchange.com/a/280193
|
||||
func SplitWithEscaping(s string, separator string, escapeString string) []string {
|
||||
a := strings.Split(s, separator)
|
||||
|
||||
for i := len(a) - 2; i >= 0; i-- {
|
||||
if strings.HasSuffix(a[i], escapeString) {
|
||||
a[i] = a[i][:len(a[i])-len(escapeString)] + separator + a[i+1]
|
||||
a = append(a[:i+1], a[i+2:]...)
|
||||
}
|
||||
}
|
||||
return a
|
||||
}
|
||||
|
||||
// WalkSegments uses the given array of segments to walk the claims and return whatever interface was found
|
||||
func WalkSegments(segments []string, claims map[string]interface{}) (interface{}, error) {
|
||||
i := 0
|
||||
for ; i < len(segments)-1; i++ {
|
||||
switch castedClaims := claims[segments[i]].(type) {
|
||||
case map[string]interface{}:
|
||||
claims = castedClaims
|
||||
case map[interface{}]interface{}:
|
||||
claims = make(map[string]interface{}, len(castedClaims))
|
||||
for k, v := range castedClaims {
|
||||
if s, ok := k.(string); ok {
|
||||
claims[s] = v
|
||||
} else {
|
||||
return nil, fmt.Errorf("could not walk claims path, key '%v' is not a string", k)
|
||||
}
|
||||
}
|
||||
default:
|
||||
return nil, fmt.Errorf("unsupported type '%v'", castedClaims)
|
||||
}
|
||||
}
|
||||
return claims[segments[i]], nil
|
||||
}
|
||||
|
||||
// ReadStringClaim returns the string obtained by following the . seperated path in the claims
|
||||
func ReadStringClaim(path string, claims map[string]interface{}) (string, error) {
|
||||
// check the simple case first
|
||||
value, _ := claims[path].(string)
|
||||
if value != "" {
|
||||
return value, nil
|
||||
}
|
||||
|
||||
claim, err := WalkSegments(SplitWithEscaping(path, ".", "\\"), claims)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
if value, _ = claim.(string); value != "" {
|
||||
return value, nil
|
||||
}
|
||||
|
||||
return value, fmt.Errorf("claim path '%s' not set or empty", path)
|
||||
}
|
||||
@@ -0,0 +1,182 @@
|
||||
package oidc_test
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/oidc"
|
||||
)
|
||||
|
||||
type splitWithEscapingTest struct {
|
||||
// Name of the subtest.
|
||||
name string
|
||||
|
||||
// string to split
|
||||
s string
|
||||
|
||||
// seperator to use
|
||||
seperator string
|
||||
|
||||
// escape character to use for escaping
|
||||
escape string
|
||||
|
||||
expectedParts []string
|
||||
}
|
||||
|
||||
func (swet splitWithEscapingTest) run(t *testing.T) {
|
||||
parts := oidc.SplitWithEscaping(swet.s, swet.seperator, swet.escape)
|
||||
if len(swet.expectedParts) != len(parts) {
|
||||
t.Errorf("mismatching length")
|
||||
}
|
||||
for i, v := range swet.expectedParts {
|
||||
if parts[i] != v {
|
||||
t.Errorf("expected part %d to be '%s', got '%s'", i, v, parts[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestSplitWithEscaping(t *testing.T) {
|
||||
tests := []splitWithEscapingTest{
|
||||
{
|
||||
name: "plain claim name",
|
||||
s: "roles",
|
||||
seperator: ".",
|
||||
escape: "\\",
|
||||
expectedParts: []string{"roles"},
|
||||
},
|
||||
{
|
||||
name: "claim with .",
|
||||
s: "my.roles",
|
||||
seperator: ".",
|
||||
escape: "\\",
|
||||
expectedParts: []string{"my", "roles"},
|
||||
},
|
||||
{
|
||||
name: "claim with escaped .",
|
||||
s: "my\\.roles",
|
||||
seperator: ".",
|
||||
escape: "\\",
|
||||
expectedParts: []string{"my.roles"},
|
||||
},
|
||||
{
|
||||
name: "claim with escaped . left",
|
||||
s: "my\\.other.roles",
|
||||
seperator: ".",
|
||||
escape: "\\",
|
||||
expectedParts: []string{"my.other", "roles"},
|
||||
},
|
||||
{
|
||||
name: "claim with escaped . right",
|
||||
s: "my.other\\.roles",
|
||||
seperator: ".",
|
||||
escape: "\\",
|
||||
expectedParts: []string{"my", "other.roles"},
|
||||
},
|
||||
}
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, test.run)
|
||||
}
|
||||
}
|
||||
|
||||
type walkSegmentsTest struct {
|
||||
// Name of the subtest.
|
||||
name string
|
||||
|
||||
// path segments to walk
|
||||
segments []string
|
||||
|
||||
// seperator to use
|
||||
claims map[string]interface{}
|
||||
|
||||
expected interface{}
|
||||
|
||||
wantErr bool
|
||||
}
|
||||
|
||||
func (wst walkSegmentsTest) run(t *testing.T) {
|
||||
v, err := oidc.WalkSegments(wst.segments, wst.claims)
|
||||
if err != nil && !wst.wantErr {
|
||||
t.Errorf("%v", err)
|
||||
}
|
||||
if err == nil && wst.wantErr {
|
||||
t.Errorf("expected error")
|
||||
}
|
||||
if !reflect.DeepEqual(v, wst.expected) {
|
||||
t.Errorf("expected %v got %v", wst.expected, v)
|
||||
}
|
||||
}
|
||||
|
||||
func TestWalkSegments(t *testing.T) {
|
||||
byt := []byte(`{"first":{"second":{"third":["value1","value2"]},"foo":"bar"},"fizz":"buzz"}`)
|
||||
var dat map[string]interface{}
|
||||
if err := json.Unmarshal(byt, &dat); err != nil {
|
||||
t.Errorf("%v", err)
|
||||
}
|
||||
|
||||
tests := []walkSegmentsTest{
|
||||
{
|
||||
name: "one segment, single value",
|
||||
segments: []string{"first"},
|
||||
claims: map[string]interface{}{
|
||||
"first": "value",
|
||||
},
|
||||
expected: "value",
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: "one segment, array value",
|
||||
segments: []string{"first"},
|
||||
claims: map[string]interface{}{
|
||||
"first": []string{"value1", "value2"},
|
||||
},
|
||||
expected: []string{"value1", "value2"},
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: "two segments, single value",
|
||||
segments: []string{"first", "second"},
|
||||
claims: map[string]interface{}{
|
||||
"first": map[string]interface{}{
|
||||
"second": "value",
|
||||
},
|
||||
},
|
||||
expected: "value",
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: "two segments, array value",
|
||||
segments: []string{"first", "second"},
|
||||
claims: map[string]interface{}{
|
||||
"first": map[string]interface{}{
|
||||
"second": []string{"value1", "value2"},
|
||||
},
|
||||
},
|
||||
expected: []string{"value1", "value2"},
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: "three segments, array value from json",
|
||||
segments: []string{"first", "second", "third"},
|
||||
claims: dat,
|
||||
expected: []interface{}{"value1", "value2"},
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: "three segments, array value with interface key",
|
||||
segments: []string{"first", "second", "third"},
|
||||
claims: map[string]interface{}{
|
||||
"first": map[interface{}]interface{}{
|
||||
"second": map[interface{}]interface{}{
|
||||
"third": []string{"value1", "value2"},
|
||||
},
|
||||
},
|
||||
},
|
||||
expected: []string{"value1", "value2"},
|
||||
wantErr: false,
|
||||
},
|
||||
}
|
||||
for _, test := range tests {
|
||||
t.Run(test.name, test.run)
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ var (
|
||||
// LatestTag is the latest released version plus the dev meta version.
|
||||
// Will be overwritten by the release pipeline
|
||||
// Needs a manual change for every tagged release
|
||||
LatestTag = "5.0.0-alpha.4+dev"
|
||||
LatestTag = "5.0.0-alpha.5+dev"
|
||||
|
||||
// Date indicates the build date.
|
||||
// This has been removed, it looks like you can only replace static strings with recent go versions
|
||||
|
||||
@@ -7,15 +7,21 @@ import (
|
||||
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
|
||||
)
|
||||
|
||||
// FromCS3Status converts a CS3 status code into a corresponding local Error representation.
|
||||
// FromCS3Status converts a CS3 status code and an error into a corresponding local Error representation.
|
||||
//
|
||||
// It evaluates the provided CS3 status code and returns an equivalent graph Error.
|
||||
// It takes a *cs3rpc.Status, an error, and a variadic parameter of type cs3rpc.Code.
|
||||
// If the error is not nil, it creates an Error object with the error message and a GeneralException code.
|
||||
// If the error is nil, it evaluates the provided CS3 status code and returns an equivalent graph Error.
|
||||
// If the CS3 status code does not have a direct equivalent within the app,
|
||||
// or is ignored, a general purpose Error is returned.
|
||||
//
|
||||
// This function is particularly useful when dealing with CS3 responses,
|
||||
// and a unified error handling within the application is necessary.
|
||||
func FromCS3Status(status *cs3rpc.Status, ignore ...cs3rpc.Code) *Error {
|
||||
func FromCS3Status(status *cs3rpc.Status, inerr error, ignore ...cs3rpc.Code) *Error {
|
||||
if inerr != nil {
|
||||
return &Error{msg: inerr.Error(), errorCode: GeneralException}
|
||||
}
|
||||
|
||||
err := &Error{errorCode: GeneralException, msg: "unspecified error has occurred"}
|
||||
|
||||
if status != nil {
|
||||
@@ -40,8 +46,16 @@ func FromCS3Status(status *cs3rpc.Status, ignore ...cs3rpc.Code) *Error {
|
||||
err.errorCode = NameAlreadyExists
|
||||
case code == cs3rpc.Code_CODE_FAILED_PRECONDITION:
|
||||
err.errorCode = PreconditionFailed
|
||||
case code == cs3rpc.Code_CODE_OUT_OF_RANGE:
|
||||
err.errorCode = InvalidRange
|
||||
case code == cs3rpc.Code_CODE_UNIMPLEMENTED:
|
||||
err.errorCode = NotSupported
|
||||
case code == cs3rpc.Code_CODE_UNAVAILABLE:
|
||||
err.errorCode = ServiceNotAvailable
|
||||
case code == cs3rpc.Code_CODE_INSUFFICIENT_STORAGE:
|
||||
err.errorCode = QuotaLimitReached
|
||||
case code == cs3rpc.Code_CODE_LOCKED:
|
||||
err.errorCode = ItemIsLocked
|
||||
}
|
||||
|
||||
return err
|
||||
@@ -50,13 +64,8 @@ func FromCS3Status(status *cs3rpc.Status, ignore ...cs3rpc.Code) *Error {
|
||||
// FromStat transforms a *provider.StatResponse object and an error into an *Error.
|
||||
//
|
||||
// It takes a stat of type *provider.StatResponse, an error, and a variadic parameter of type cs3rpc.Code.
|
||||
// If the error is not nil, it creates an Error object with the error message and a GeneralException code.
|
||||
// If the error is nil, it invokes the FromCS3Status function with the StatResponse Status and the ignore codes.
|
||||
// It invokes the FromCS3Status function with the StatResponse Status and the ignore codes.
|
||||
func FromStat(stat *provider.StatResponse, err error, ignore ...cs3rpc.Code) *Error {
|
||||
switch {
|
||||
case err != nil:
|
||||
return &Error{msg: err.Error(), errorCode: GeneralException}
|
||||
default:
|
||||
return FromCS3Status(stat.GetStatus(), ignore...)
|
||||
}
|
||||
// TODO: look into ResourceInfo to get the postprocessing state and map that to 425 status?
|
||||
return FromCS3Status(stat.GetStatus(), err, ignore...)
|
||||
}
|
||||
@@ -15,35 +15,37 @@ import (
|
||||
func TestFromCS3Status(t *testing.T) {
|
||||
var tests = []struct {
|
||||
status *cs3rpc.Status
|
||||
err error
|
||||
ignore []cs3rpc.Code
|
||||
result *errorcode.Error
|
||||
}{
|
||||
{nil, nil, conversions.ToPointer(errorcode.New(errorcode.GeneralException, "unspecified error has occurred"))},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_OK}, nil, nil},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_NOT_FOUND}, []cs3rpc.Code{cs3rpc.Code_CODE_NOT_FOUND}, nil},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_PERMISSION_DENIED}, []cs3rpc.Code{cs3rpc.Code_CODE_NOT_FOUND, cs3rpc.Code_CODE_PERMISSION_DENIED}, nil},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_NOT_FOUND, Message: "msg"}, nil, conversions.ToPointer(errorcode.New(errorcode.ItemNotFound, "msg"))},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_PERMISSION_DENIED, Message: "msg"}, nil, conversions.ToPointer(errorcode.New(errorcode.AccessDenied, "msg"))},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_UNAUTHENTICATED, Message: "msg"}, nil, conversions.ToPointer(errorcode.New(errorcode.Unauthenticated, "msg"))},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_INVALID_ARGUMENT, Message: "msg"}, nil, conversions.ToPointer(errorcode.New(errorcode.InvalidRequest, "msg"))},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_ALREADY_EXISTS, Message: "msg"}, nil, conversions.ToPointer(errorcode.New(errorcode.NameAlreadyExists, "msg"))},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_FAILED_PRECONDITION, Message: "msg"}, nil, conversions.ToPointer(errorcode.New(errorcode.PreconditionFailed, "msg"))},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_UNIMPLEMENTED, Message: "msg"}, nil, conversions.ToPointer(errorcode.New(errorcode.NotSupported, "msg"))},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_INVALID, Message: "msg"}, nil, conversions.ToPointer(errorcode.New(errorcode.GeneralException, "msg"))},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_CANCELLED, Message: "msg"}, nil, conversions.ToPointer(errorcode.New(errorcode.GeneralException, "msg"))},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_UNKNOWN, Message: "msg"}, nil, conversions.ToPointer(errorcode.New(errorcode.GeneralException, "msg"))},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_RESOURCE_EXHAUSTED, Message: "msg"}, nil, conversions.ToPointer(errorcode.New(errorcode.GeneralException, "msg"))},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_ABORTED, Message: "msg"}, nil, conversions.ToPointer(errorcode.New(errorcode.GeneralException, "msg"))},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_OUT_OF_RANGE, Message: "msg"}, nil, conversions.ToPointer(errorcode.New(errorcode.GeneralException, "msg"))},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_INTERNAL, Message: "msg"}, nil, conversions.ToPointer(errorcode.New(errorcode.GeneralException, "msg"))},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_UNAVAILABLE, Message: "msg"}, nil, conversions.ToPointer(errorcode.New(errorcode.GeneralException, "msg"))},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_REDIRECTION, Message: "msg"}, nil, conversions.ToPointer(errorcode.New(errorcode.GeneralException, "msg"))},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_INSUFFICIENT_STORAGE, Message: "msg"}, nil, conversions.ToPointer(errorcode.New(errorcode.GeneralException, "msg"))},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_LOCKED, Message: "msg"}, nil, conversions.ToPointer(errorcode.New(errorcode.GeneralException, "msg"))},
|
||||
{nil, nil, nil, conversions.ToPointer(errorcode.New(errorcode.GeneralException, "unspecified error has occurred"))},
|
||||
{nil, errors.New("test error"), nil, conversions.ToPointer(errorcode.New(errorcode.GeneralException, "test error"))},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_OK}, nil, nil, nil},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_NOT_FOUND}, nil, []cs3rpc.Code{cs3rpc.Code_CODE_NOT_FOUND}, nil},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_PERMISSION_DENIED}, nil, []cs3rpc.Code{cs3rpc.Code_CODE_NOT_FOUND, cs3rpc.Code_CODE_PERMISSION_DENIED}, nil},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_NOT_FOUND, Message: "msg"}, nil, nil, conversions.ToPointer(errorcode.New(errorcode.ItemNotFound, "msg"))},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_PERMISSION_DENIED, Message: "msg"}, nil, nil, conversions.ToPointer(errorcode.New(errorcode.AccessDenied, "msg"))},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_UNAUTHENTICATED, Message: "msg"}, nil, nil, conversions.ToPointer(errorcode.New(errorcode.Unauthenticated, "msg"))},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_INVALID_ARGUMENT, Message: "msg"}, nil, nil, conversions.ToPointer(errorcode.New(errorcode.InvalidRequest, "msg"))},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_ALREADY_EXISTS, Message: "msg"}, nil, nil, conversions.ToPointer(errorcode.New(errorcode.NameAlreadyExists, "msg"))},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_FAILED_PRECONDITION, Message: "msg"}, nil, nil, conversions.ToPointer(errorcode.New(errorcode.PreconditionFailed, "msg"))},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_UNIMPLEMENTED, Message: "msg"}, nil, nil, conversions.ToPointer(errorcode.New(errorcode.NotSupported, "msg"))},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_INVALID, Message: "msg"}, nil, nil, conversions.ToPointer(errorcode.New(errorcode.GeneralException, "msg"))},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_CANCELLED, Message: "msg"}, nil, nil, conversions.ToPointer(errorcode.New(errorcode.GeneralException, "msg"))},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_UNKNOWN, Message: "msg"}, nil, nil, conversions.ToPointer(errorcode.New(errorcode.GeneralException, "msg"))},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_RESOURCE_EXHAUSTED, Message: "msg"}, nil, nil, conversions.ToPointer(errorcode.New(errorcode.GeneralException, "msg"))},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_ABORTED, Message: "msg"}, nil, nil, conversions.ToPointer(errorcode.New(errorcode.GeneralException, "msg"))},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_OUT_OF_RANGE, Message: "msg"}, nil, nil, conversions.ToPointer(errorcode.New(errorcode.InvalidRange, "msg"))},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_INTERNAL, Message: "msg"}, nil, nil, conversions.ToPointer(errorcode.New(errorcode.GeneralException, "msg"))},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_UNAVAILABLE, Message: "msg"}, nil, nil, conversions.ToPointer(errorcode.New(errorcode.ServiceNotAvailable, "msg"))},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_REDIRECTION, Message: "msg"}, nil, nil, conversions.ToPointer(errorcode.New(errorcode.GeneralException, "msg"))},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_INSUFFICIENT_STORAGE, Message: "msg"}, nil, nil, conversions.ToPointer(errorcode.New(errorcode.QuotaLimitReached, "msg"))},
|
||||
{&cs3rpc.Status{Code: cs3rpc.Code_CODE_LOCKED, Message: "msg"}, nil, nil, conversions.ToPointer(errorcode.New(errorcode.ItemIsLocked, "msg"))},
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
if output := errorcode.FromCS3Status(test.status, test.ignore...); !reflect.DeepEqual(output, test.result) {
|
||||
if output := errorcode.FromCS3Status(test.status, test.err, test.ignore...); !reflect.DeepEqual(output, test.result) {
|
||||
t.Error("Test Failed: {} expected, recieved: {}", test.result, output)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,6 +154,10 @@ func (e Error) Error() string {
|
||||
return errString
|
||||
}
|
||||
|
||||
func (e Error) GetCode() ErrorCode {
|
||||
return e.errorCode
|
||||
}
|
||||
|
||||
// RenderError render the Graph Error based on a code or default one
|
||||
func RenderError(w http.ResponseWriter, r *http.Request, err error) {
|
||||
var errcode Error
|
||||
|
||||
@@ -2,6 +2,7 @@ package svc
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
@@ -13,6 +14,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1"
|
||||
grouppb "github.com/cs3org/go-cs3apis/cs3/identity/group/v1beta1"
|
||||
userpb "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
|
||||
cs3rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1"
|
||||
@@ -40,6 +42,111 @@ import (
|
||||
"github.com/owncloud/ocis/v2/services/graph/pkg/validate"
|
||||
)
|
||||
|
||||
// From https://learn.microsoft.com/en-us/graph/api/driveitem-createuploadsession?view=graph-rest-1.0
|
||||
// CreateUploadSession create an upload session to allow your app to upload files up to the maximum file size.
|
||||
// An upload session allows your app to upload ranges of the file in sequential API requests, which allows the
|
||||
// transfer to be resumed if a connection is dropped while the upload is in progress.
|
||||
// ```json
|
||||
//
|
||||
// {
|
||||
// "@microsoft.graph.conflictBehavior": "fail (default) | replace | rename",
|
||||
// "description": "description",
|
||||
// "fileSize": 1234,
|
||||
// "name": "filename.txt"
|
||||
// }
|
||||
//
|
||||
// ```
|
||||
func (g Graph) CreateUploadSession(w http.ResponseWriter, r *http.Request) {
|
||||
g.logger.Info().Msg("Calling CreateUploadSession")
|
||||
|
||||
driveID, err := parseIDParam(r, "driveID")
|
||||
if err != nil {
|
||||
errorcode.RenderError(w, r, err)
|
||||
return
|
||||
}
|
||||
driveItemID, err := parseIDParam(r, "driveItemID")
|
||||
if err != nil {
|
||||
errorcode.RenderError(w, r, err)
|
||||
return
|
||||
}
|
||||
if driveID.StorageId != driveItemID.StorageId || driveID.SpaceId != driveItemID.SpaceId {
|
||||
errorcode.ItemNotFound.Render(w, r, http.StatusNotFound, "Item does not exist")
|
||||
return
|
||||
}
|
||||
|
||||
var cusr createUploadSessionRequest
|
||||
err = json.NewDecoder(r.Body).Decode(&cusr)
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
|
||||
gatewayClient, err := g.gatewaySelector.Next()
|
||||
if err != nil {
|
||||
g.logger.Error().Err(err).Msg("could not select next gateway client")
|
||||
errorcode.ServiceNotAvailable.Render(w, r, http.StatusInternalServerError, "could not select next gateway client, aborting")
|
||||
return
|
||||
}
|
||||
|
||||
ref := &storageprovider.Reference{
|
||||
ResourceId: &driveItemID,
|
||||
}
|
||||
if cusr.Item.Name != "" {
|
||||
ref.Path = utils.MakeRelativePath(cusr.Item.Name)
|
||||
}
|
||||
// TODO size?
|
||||
|
||||
ctx := r.Context()
|
||||
res, err := gatewayClient.InitiateFileUpload(ctx, &storageprovider.InitiateFileUploadRequest{Ref: ref})
|
||||
switch {
|
||||
case err != nil:
|
||||
errorcode.GeneralException.Render(w, r, http.StatusInternalServerError, err.Error())
|
||||
return
|
||||
case res.Status.Code == cs3rpc.Code_CODE_OK:
|
||||
// ok
|
||||
case res.Status.Code == cs3rpc.Code_CODE_NOT_FOUND:
|
||||
errorcode.ItemNotFound.Render(w, r, http.StatusNotFound, res.Status.Message)
|
||||
return
|
||||
case res.Status.Code == cs3rpc.Code_CODE_PERMISSION_DENIED:
|
||||
errorcode.ItemNotFound.Render(w, r, http.StatusNotFound, res.Status.Message) // do not leak existence? check what graph does
|
||||
return
|
||||
case res.Status.Code == cs3rpc.Code_CODE_UNAUTHENTICATED:
|
||||
errorcode.Unauthenticated.Render(w, r, http.StatusUnauthorized, res.Status.Message) // do not leak existence? check what graph does
|
||||
return
|
||||
default:
|
||||
errorcode.GeneralException.Render(w, r, http.StatusInternalServerError, res.Status.Message)
|
||||
return
|
||||
}
|
||||
uploadSession := uploadSession{
|
||||
CS3Protocols: res.Protocols,
|
||||
}
|
||||
for _, p := range res.Protocols {
|
||||
if p.Protocol == "simple" {
|
||||
uploadSession.UploadUrl = p.UploadEndpoint + "/" + p.Token
|
||||
}
|
||||
}
|
||||
render.Status(r, http.StatusOK)
|
||||
render.JSON(w, r, &uploadSession)
|
||||
}
|
||||
|
||||
type createUploadSessionRequest struct {
|
||||
DeferCommit bool
|
||||
Item driveItemUploadableProperties
|
||||
}
|
||||
type driveItemUploadableProperties struct {
|
||||
// ConflictBehavior "@microsoft.graph.conflictBehavior"
|
||||
//Description string
|
||||
FileSize int64
|
||||
// fileSystemInfo
|
||||
Name string
|
||||
}
|
||||
type uploadSession struct {
|
||||
UploadUrl string
|
||||
//"expirationDateTime": "2015-01-29T09:21:55.523Z",
|
||||
//"nextExpectedRanges": ["0-"]
|
||||
CS3Protocols []*gateway.FileUploadProtocol
|
||||
}
|
||||
|
||||
// GetRootDriveChildren implements the Service interface.
|
||||
func (g Graph) GetRootDriveChildren(w http.ResponseWriter, r *http.Request) {
|
||||
g.logger.Info().Msg("Calling GetRootDriveChildren")
|
||||
@@ -504,14 +611,7 @@ func (g Graph) Invite(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
// DeletePermission removes a Permission from a Drive item
|
||||
func (g Graph) DeletePermission(w http.ResponseWriter, r *http.Request) {
|
||||
gatewayClient, err := g.gatewaySelector.Next()
|
||||
if err != nil {
|
||||
g.logger.Debug().Err(err).Msg("selecting gatewaySelector failed")
|
||||
errorcode.GeneralException.Render(w, r, http.StatusInternalServerError, http.StatusText(http.StatusInternalServerError))
|
||||
return
|
||||
}
|
||||
|
||||
_, itemID, err := g.extractDriveAndDriveItem(r)
|
||||
_, itemID, err := g.GetDriveAndItemIDParam(r)
|
||||
if err != nil {
|
||||
errorcode.RenderError(w, r, err)
|
||||
return
|
||||
@@ -526,6 +626,56 @@ func (g Graph) DeletePermission(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
ctx := r.Context()
|
||||
isUserPermission := true
|
||||
|
||||
// Check if the id is refering to a User Share
|
||||
sharedResourceId, err := g.getUserPermissionResourceID(ctx, permissionID)
|
||||
var errcode *errorcode.Error
|
||||
if err != nil && errors.As(err, &errcode) && errcode.GetCode() == errorcode.ItemNotFound {
|
||||
// there is no user share with that ID, so lets check if it is refering to a public link
|
||||
isUserPermission = false
|
||||
sharedResourceId, err = g.getLinkPermissionResourceID(ctx, permissionID)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
errorcode.RenderError(w, r, err)
|
||||
return
|
||||
}
|
||||
|
||||
// The resourceID of the shared resource need to match the item ID from the Request Path
|
||||
// otherwise this is an invalid Request.
|
||||
if sharedResourceId.GetStorageId() != itemID.GetStorageId() ||
|
||||
sharedResourceId.GetSpaceId() != itemID.GetSpaceId() ||
|
||||
sharedResourceId.GetOpaqueId() != itemID.GetOpaqueId() {
|
||||
g.logger.Debug().Msg("resourceID of shared does not match itemID")
|
||||
errorcode.InvalidRequest.Render(w, r, http.StatusBadRequest, "permissionID and itemID do not match")
|
||||
return
|
||||
}
|
||||
|
||||
if isUserPermission {
|
||||
err = g.removeUserShare(ctx, permissionID)
|
||||
} else {
|
||||
err = g.removePublicShare(ctx, permissionID)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
errorcode.RenderError(w, r, err)
|
||||
return
|
||||
}
|
||||
|
||||
render.Status(r, http.StatusNoContent)
|
||||
render.NoContent(w, r)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (g Graph) getUserPermissionResourceID(ctx context.Context, permissionID string) (*storageprovider.ResourceId, error) {
|
||||
gatewayClient, err := g.gatewaySelector.Next()
|
||||
if err != nil {
|
||||
g.logger.Debug().Err(err).Msg("selecting gatewaySelector failed")
|
||||
return nil, err
|
||||
}
|
||||
|
||||
getShareResp, err := gatewayClient.GetShare(ctx,
|
||||
&collaboration.GetShareRequest{
|
||||
Ref: &collaboration.ShareReference{
|
||||
@@ -536,24 +686,17 @@ func (g Graph) DeletePermission(w http.ResponseWriter, r *http.Request) {
|
||||
},
|
||||
},
|
||||
})
|
||||
switch {
|
||||
case err != nil:
|
||||
fallthrough
|
||||
case getShareResp.Status.GetCode() != cs3rpc.Code_CODE_OK:
|
||||
g.logger.Debug().Err(err).Interface("permissionID", permissionID).Interface("GetShare", getShareResp).Msg("GetShare failed")
|
||||
errorcode.GeneralException.Render(w, r, http.StatusInternalServerError, http.StatusText(http.StatusInternalServerError))
|
||||
return
|
||||
if errCode := errorcode.FromCS3Status(getShareResp.GetStatus(), err); errCode != nil {
|
||||
return nil, errCode
|
||||
}
|
||||
return getShareResp.Share.GetResourceId(), nil
|
||||
}
|
||||
|
||||
sharedResourceId := getShareResp.GetShare().GetResourceId()
|
||||
// The resourceID of the shared resource need to matched the item ID from the Request Path
|
||||
// otherwise this is an invalid Request.
|
||||
if sharedResourceId.GetStorageId() != itemID.GetStorageId() ||
|
||||
sharedResourceId.GetSpaceId() != itemID.GetSpaceId() ||
|
||||
sharedResourceId.GetOpaqueId() != itemID.GetOpaqueId() {
|
||||
g.logger.Debug().Msg("resourceID of shared does not match itemID")
|
||||
errorcode.InvalidRequest.Render(w, r, http.StatusBadRequest, "permissionID and itemID do not match")
|
||||
return
|
||||
func (g Graph) removeUserShare(ctx context.Context, permissionID string) error {
|
||||
gatewayClient, err := g.gatewaySelector.Next()
|
||||
if err != nil {
|
||||
g.logger.Debug().Err(err).Msg("selecting gatewaySelector failed")
|
||||
return err
|
||||
}
|
||||
|
||||
removeShareResp, err := gatewayClient.RemoveShare(ctx,
|
||||
@@ -566,38 +709,60 @@ func (g Graph) DeletePermission(w http.ResponseWriter, r *http.Request) {
|
||||
},
|
||||
},
|
||||
})
|
||||
switch {
|
||||
case err != nil:
|
||||
fallthrough
|
||||
case removeShareResp.Status.GetCode() != cs3rpc.Code_CODE_OK:
|
||||
g.logger.Debug().Err(err).Interface("permissionID", permissionID).Interface("GetShare", getShareResp).Msg("GetShare failed")
|
||||
errorcode.GeneralException.Render(w, r, http.StatusInternalServerError, http.StatusText(http.StatusInternalServerError))
|
||||
return
|
||||
}
|
||||
render.Status(r, http.StatusNoContent)
|
||||
render.NoContent(w, r)
|
||||
|
||||
return
|
||||
if errCode := errorcode.FromCS3Status(removeShareResp.GetStatus(), err); errCode != nil {
|
||||
return errCode
|
||||
}
|
||||
// We need to return an untyped nil here otherwise the error==nil check won't work
|
||||
return nil
|
||||
}
|
||||
|
||||
func (g Graph) extractDriveAndDriveItem(r *http.Request) (driveID storageprovider.ResourceId, itemID storageprovider.ResourceId, err error) {
|
||||
driveID, err = parseIDParam(r, "driveID")
|
||||
func (g Graph) getLinkPermissionResourceID(ctx context.Context, permissionID string) (*storageprovider.ResourceId, error) {
|
||||
gatewayClient, err := g.gatewaySelector.Next()
|
||||
if err != nil {
|
||||
g.logger.Debug().Err(err).Msg("could not parse driveID")
|
||||
return driveID, itemID, errorcode.New(errorcode.InvalidRequest, "invalid driveID")
|
||||
g.logger.Debug().Err(err).Msg("selecting gatewaySelector failed")
|
||||
return nil, err
|
||||
}
|
||||
|
||||
itemID, err = parseIDParam(r, "itemID")
|
||||
getPublicShareResp, err := gatewayClient.GetPublicShare(ctx,
|
||||
&link.GetPublicShareRequest{
|
||||
Ref: &link.PublicShareReference{
|
||||
Spec: &link.PublicShareReference_Id{
|
||||
Id: &link.PublicShareId{
|
||||
OpaqueId: permissionID,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
)
|
||||
if errCode := errorcode.FromCS3Status(getPublicShareResp.GetStatus(), err); errCode != nil {
|
||||
return nil, errCode
|
||||
}
|
||||
return getPublicShareResp.Share.GetResourceId(), nil
|
||||
}
|
||||
|
||||
func (g Graph) removePublicShare(ctx context.Context, permissionID string) error {
|
||||
gatewayClient, err := g.gatewaySelector.Next()
|
||||
if err != nil {
|
||||
g.logger.Debug().Err(err).Msg("could not parse itemID")
|
||||
return driveID, itemID, errorcode.New(errorcode.InvalidRequest, "invalid itemID")
|
||||
g.logger.Debug().Err(err).Msg("selecting gatewaySelector failed")
|
||||
return err
|
||||
}
|
||||
|
||||
if driveID.GetStorageId() != itemID.GetStorageId() || driveID.GetSpaceId() != itemID.GetSpaceId() {
|
||||
g.logger.Debug().Interface("driveID", driveID).Interface("itemID", itemID).Msg("driveID and itemID do not match")
|
||||
return driveID, itemID, errorcode.New(errorcode.InvalidRequest, "driveID and itemID do not match")
|
||||
removePublicShareResp, err := gatewayClient.RemovePublicShare(ctx,
|
||||
&link.RemovePublicShareRequest{
|
||||
Ref: &link.PublicShareReference{
|
||||
Spec: &link.PublicShareReference_Id{
|
||||
Id: &link.PublicShareId{
|
||||
OpaqueId: permissionID,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
if errcode := errorcode.FromCS3Status(removePublicShareResp.GetStatus(), err); errcode != nil {
|
||||
return errcode
|
||||
}
|
||||
return driveID, itemID, nil
|
||||
// We need to return an untyped nil here otherwise the error==nil check won't work
|
||||
return nil
|
||||
}
|
||||
|
||||
func (g Graph) getDriveItem(ctx context.Context, ref storageprovider.Reference) (*libregraph.DriveItem, error) {
|
||||
|
||||
@@ -105,51 +105,7 @@ var _ = Describe("Driveitems", func() {
|
||||
})
|
||||
|
||||
Describe("DeletePermission", func() {
|
||||
It("validates the driveID", func() {
|
||||
rctx := chi.NewRouteContext()
|
||||
rctx.URLParams.Add("driveID", "")
|
||||
|
||||
ctx = context.WithValue(context.Background(), chi.RouteCtxKey, rctx)
|
||||
|
||||
svc.DeletePermission(
|
||||
rr,
|
||||
httptest.NewRequest(http.MethodPost, "/", nil).WithContext(ctx),
|
||||
)
|
||||
|
||||
Expect(rr.Code).To(Equal(http.StatusBadRequest))
|
||||
})
|
||||
|
||||
It("validates the itemID", func() {
|
||||
rctx := chi.NewRouteContext()
|
||||
rctx.URLParams.Add("driveID", "f0042750-23c5-441c-9f2c-ff7c53e5bd2a$cd621428-dfbe-44c1-9393-65bf0dd440a6!cd621428-dfbe-44c1-9393-65bf0dd440a6")
|
||||
rctx.URLParams.Add("itemID", "")
|
||||
|
||||
ctx = context.WithValue(context.Background(), chi.RouteCtxKey, rctx)
|
||||
|
||||
svc.DeletePermission(
|
||||
rr,
|
||||
httptest.NewRequest(http.MethodPost, "/", nil).WithContext(ctx),
|
||||
)
|
||||
|
||||
Expect(rr.Code).To(Equal(http.StatusBadRequest))
|
||||
})
|
||||
|
||||
It("checks if the itemID and driveID is compatible to each other", func() {
|
||||
rctx := chi.NewRouteContext()
|
||||
rctx.URLParams.Add("driveID", "1$2!3")
|
||||
rctx.URLParams.Add("itemID", "4$5!6")
|
||||
|
||||
ctx = context.WithValue(context.Background(), chi.RouteCtxKey, rctx)
|
||||
|
||||
svc.DeletePermission(
|
||||
rr,
|
||||
httptest.NewRequest(http.MethodPost, "/", nil).WithContext(ctx),
|
||||
)
|
||||
|
||||
Expect(rr.Code).To(Equal(http.StatusBadRequest))
|
||||
})
|
||||
|
||||
It("deletes a permission as expected", func() {
|
||||
It("deletes a user permission as expected", func() {
|
||||
getShareMock := gatewayClient.On("GetShare",
|
||||
mock.Anything,
|
||||
mock.MatchedBy(func(req *collaboration.GetShareRequest) bool {
|
||||
@@ -196,6 +152,63 @@ var _ = Describe("Driveitems", func() {
|
||||
|
||||
Expect(rr.Code).To(Equal(http.StatusNoContent))
|
||||
})
|
||||
It("deletes a link permission as expected", func() {
|
||||
getShareMock := gatewayClient.On("GetShare",
|
||||
mock.Anything,
|
||||
mock.MatchedBy(func(req *collaboration.GetShareRequest) bool {
|
||||
return req.GetRef().GetId().GetOpaqueId() == "linkpermissionid"
|
||||
}),
|
||||
)
|
||||
getShareMockResponse := &collaboration.GetShareResponse{
|
||||
Status: status.NewNotFound(ctx, "not found"),
|
||||
}
|
||||
getShareMock.Return(getShareMockResponse, nil)
|
||||
|
||||
getPublicShareMock := gatewayClient.On("GetPublicShare",
|
||||
mock.Anything,
|
||||
mock.MatchedBy(func(req *link.GetPublicShareRequest) bool {
|
||||
return req.GetRef().GetId().GetOpaqueId() == "linkpermissionid"
|
||||
}),
|
||||
)
|
||||
getPublicShareMock.Return(&link.GetPublicShareResponse{
|
||||
Status: status.NewOK(ctx),
|
||||
Share: &link.PublicShare{
|
||||
Id: &link.PublicShareId{
|
||||
OpaqueId: "permissionid",
|
||||
},
|
||||
ResourceId: &provider.ResourceId{
|
||||
StorageId: "1",
|
||||
SpaceId: "2",
|
||||
OpaqueId: "3",
|
||||
},
|
||||
},
|
||||
}, nil)
|
||||
|
||||
rmPublicShareMock := gatewayClient.On("RemovePublicShare",
|
||||
mock.Anything,
|
||||
mock.MatchedBy(func(req *link.RemovePublicShareRequest) bool {
|
||||
return req.GetRef().GetId().GetOpaqueId() == "linkpermissionid"
|
||||
}),
|
||||
)
|
||||
rmPublicShareMockResponse := &link.RemovePublicShareResponse{
|
||||
Status: status.NewOK(ctx),
|
||||
}
|
||||
rmPublicShareMock.Return(rmPublicShareMockResponse, nil)
|
||||
|
||||
rctx := chi.NewRouteContext()
|
||||
rctx.URLParams.Add("driveID", "1$2")
|
||||
rctx.URLParams.Add("itemID", "1$2!3")
|
||||
rctx.URLParams.Add("permissionID", "linkpermissionid")
|
||||
|
||||
ctx = context.WithValue(context.Background(), chi.RouteCtxKey, rctx)
|
||||
|
||||
svc.DeletePermission(
|
||||
rr,
|
||||
httptest.NewRequest(http.MethodPost, "/", nil).WithContext(ctx),
|
||||
)
|
||||
|
||||
Expect(rr.Code).To(Equal(http.StatusNoContent))
|
||||
})
|
||||
|
||||
It("fails to delete permission when the item id does not match the shared resource's id", func() {
|
||||
getShareMock := gatewayClient.On("GetShare",
|
||||
|
||||
@@ -51,8 +51,8 @@ func (g Graph) CreateLink(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
render.Status(r, http.StatusCreated)
|
||||
render.JSON(w, r, []libregraph.Permission{*perm})
|
||||
render.Status(r, http.StatusOK)
|
||||
render.JSON(w, r, *perm)
|
||||
}
|
||||
|
||||
func (g Graph) createLink(ctx context.Context, driveItemID *providerv1beta1.ResourceId, createLink libregraph.DriveItemCreateLink) (*link.PublicShare, error) {
|
||||
|
||||
@@ -163,17 +163,16 @@ var _ = Describe("createLinkTests", func() {
|
||||
WithContext(ctx),
|
||||
)
|
||||
|
||||
Expect(rr.Code).To(Equal(http.StatusCreated))
|
||||
Expect(rr.Code).To(Equal(http.StatusOK))
|
||||
|
||||
var createLinkResponseBody []*libregraph.Permission
|
||||
var createLinkResponseBody *libregraph.Permission
|
||||
err := json.Unmarshal(rr.Body.Bytes(), &createLinkResponseBody)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(len(createLinkResponseBody)).To(Equal(1))
|
||||
Expect(createLinkResponseBody[0].GetId()).To(Equal("123"))
|
||||
Expect(createLinkResponseBody[0].GetExpirationDateTime().Unix()).To(Equal(driveItemCreateLink.ExpirationDateTime.Unix()))
|
||||
Expect(createLinkResponseBody[0].GetHasPassword()).To(Equal(false))
|
||||
Expect(createLinkResponseBody[0].GetLink().LibreGraphDisplayName).To(Equal(libregraph.PtrString(ViewerLinkString)))
|
||||
link := createLinkResponseBody[0].GetLink()
|
||||
Expect(createLinkResponseBody.GetId()).To(Equal("123"))
|
||||
Expect(createLinkResponseBody.GetExpirationDateTime().Unix()).To(Equal(driveItemCreateLink.ExpirationDateTime.Unix()))
|
||||
Expect(createLinkResponseBody.GetHasPassword()).To(Equal(false))
|
||||
Expect(createLinkResponseBody.GetLink().LibreGraphDisplayName).To(Equal(libregraph.PtrString(ViewerLinkString)))
|
||||
link := createLinkResponseBody.GetLink()
|
||||
respLinkType := link.GetType()
|
||||
expected, err := libregraph.NewSharingLinkTypeFromValue("view")
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
@@ -355,17 +354,16 @@ var _ = Describe("createLinkTests", func() {
|
||||
WithContext(ctx),
|
||||
)
|
||||
|
||||
Expect(rr.Code).To(Equal(http.StatusCreated))
|
||||
Expect(rr.Code).To(Equal(http.StatusOK))
|
||||
|
||||
var createLinkResponseBody []*libregraph.Permission
|
||||
var createLinkResponseBody *libregraph.Permission
|
||||
err = json.Unmarshal(rr.Body.Bytes(), &createLinkResponseBody)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(len(createLinkResponseBody)).To(Equal(1))
|
||||
Expect(createLinkResponseBody[0].GetId()).To(Equal("123"))
|
||||
Expect(createLinkResponseBody[0].GetExpirationDateTime().Unix()).To(Equal(driveItemCreateLink.ExpirationDateTime.Unix()))
|
||||
Expect(createLinkResponseBody[0].GetHasPassword()).To(Equal(false))
|
||||
Expect(createLinkResponseBody[0].GetLink().LibreGraphDisplayName).To(Equal(libregraph.PtrString(ViewerLinkString)))
|
||||
respLink := createLinkResponseBody[0].GetLink()
|
||||
Expect(createLinkResponseBody.GetId()).To(Equal("123"))
|
||||
Expect(createLinkResponseBody.GetExpirationDateTime().Unix()).To(Equal(driveItemCreateLink.ExpirationDateTime.Unix()))
|
||||
Expect(createLinkResponseBody.GetHasPassword()).To(Equal(false))
|
||||
Expect(createLinkResponseBody.GetLink().LibreGraphDisplayName).To(Equal(libregraph.PtrString(ViewerLinkString)))
|
||||
respLink := createLinkResponseBody.GetLink()
|
||||
// some conversion gymnastics
|
||||
respLinkType := respLink.GetType()
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
@@ -374,7 +372,7 @@ var _ = Describe("createLinkTests", func() {
|
||||
mockLink.Type = lt
|
||||
expectedType := mockLink.GetType()
|
||||
Expect(&respLinkType).To(Equal(&expectedType))
|
||||
libreGraphActions := createLinkResponseBody[0].LibreGraphPermissionsActions
|
||||
libreGraphActions := createLinkResponseBody.LibreGraphPermissionsActions
|
||||
Expect(libreGraphActions[0]).To(Equal("libre.graph/driveItem/children/create"))
|
||||
Expect(libreGraphActions[1]).To(Equal("libre.graph/driveItem/upload/create"))
|
||||
Expect(libreGraphActions[2]).To(Equal("libre.graph/driveItem/path/update"))
|
||||
|
||||
@@ -113,6 +113,8 @@ type Service interface {
|
||||
ListPermissions(w http.ResponseWriter, r *http.Request)
|
||||
DeletePermission(w http.ResponseWriter, r *http.Request)
|
||||
|
||||
CreateUploadSession(w http.ResponseWriter, r *http.Request)
|
||||
|
||||
GetTags(w http.ResponseWriter, r *http.Request)
|
||||
AssignTags(w http.ResponseWriter, r *http.Request)
|
||||
UnassignTags(w http.ResponseWriter, r *http.Request)
|
||||
@@ -274,6 +276,7 @@ func NewService(opts ...Option) (Graph, error) {
|
||||
r.Route("/items/{driveItemID}", func(r chi.Router) {
|
||||
r.Get("/", svc.GetDriveItem)
|
||||
r.Get("/children", svc.GetDriveItemChildren)
|
||||
r.Post("/createUploadSession", svc.CreateUploadSession)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@@ -73,11 +73,11 @@ func (g Graph) applyFilterFunctionStartsWith(ctx context.Context, req *godata.Go
|
||||
switch operand1.Token.Value {
|
||||
case "displayName":
|
||||
var retUsers []*libregraph.User
|
||||
filterValue := operand2.Token.Value
|
||||
filterValue := strings.Trim(operand2.Token.Value, "'")
|
||||
logger.Debug().Str("property", operand2.Token.Value).Str("value", filterValue).Msg("Filtering displayName by startsWith")
|
||||
if users, err := g.identityBackend.GetUsers(ctx, req); err == nil {
|
||||
for _, user := range users {
|
||||
if strings.HasPrefix(user.GetDisplayName(), filterValue) {
|
||||
if strings.HasPrefix(strings.ToLower(user.GetDisplayName()), strings.ToLower(filterValue)) {
|
||||
retUsers = append(retUsers, user)
|
||||
}
|
||||
}
|
||||
@@ -99,11 +99,11 @@ func (g Graph) applyFilterFunctionContains(ctx context.Context, req *godata.GoDa
|
||||
switch operand1.Token.Value {
|
||||
case "displayName":
|
||||
var retUsers []*libregraph.User
|
||||
filterValue := operand2.Token.Value
|
||||
filterValue := strings.Trim(operand2.Token.Value, "'")
|
||||
logger.Debug().Str("property", operand2.Token.Value).Str("value", filterValue).Msg("Filtering displayName by contains")
|
||||
if users, err := g.identityBackend.GetUsers(ctx, req); err == nil {
|
||||
for _, user := range users {
|
||||
if strings.Contains(user.GetDisplayName(), filterValue) {
|
||||
if strings.Contains(strings.ToLower(user.GetDisplayName()), strings.ToLower(filterValue)) {
|
||||
retUsers = append(retUsers, user)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
"react": "^17.0.2",
|
||||
"react-app-polyfill": "^2.0.0",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-i18next": "^12.3.1",
|
||||
"react-i18next": "^13.5.0",
|
||||
"react-redux": "^8.1.2",
|
||||
"react-router": "^5.3.4",
|
||||
"react-router-dom": "5.2.1",
|
||||
|
||||
Generated
+8
-8
@@ -75,8 +75,8 @@ dependencies:
|
||||
specifier: ^17.0.2
|
||||
version: 17.0.2(react@17.0.2)
|
||||
react-i18next:
|
||||
specifier: ^12.3.1
|
||||
version: 12.3.1(i18next@23.6.0)(react-dom@17.0.2)(react@17.0.2)
|
||||
specifier: ^13.5.0
|
||||
version: 13.5.0(i18next@23.6.0)(react-dom@17.0.2)(react@17.0.2)
|
||||
react-redux:
|
||||
specifier: ^8.1.2
|
||||
version: 8.1.2(@types/react-dom@17.0.20)(@types/react@17.0.65)(react-dom@17.0.2)(react@17.0.2)(redux@4.2.1)
|
||||
@@ -255,8 +255,8 @@ packages:
|
||||
engines: {node: '>=0.10.0'}
|
||||
dev: true
|
||||
|
||||
/@adobe/css-tools@4.3.1:
|
||||
resolution: {integrity: sha512-/62yikz7NLScCGAAST5SHdnjaDJQBDq0M2muyRTpf2VQhw6StBg2ALiu73zSJQ4fMVLA+0uBhBHAle7Wg+2kSg==}
|
||||
/@adobe/css-tools@4.3.2:
|
||||
resolution: {integrity: sha512-DA5a1C0gD/pLOvhv33YMrbf2FK3oUzwNl9oOJqE4XVjuEtt6XIakRcsd7eLiOSPkp1kTRQGICTA8cKra/vFbjw==}
|
||||
dev: false
|
||||
|
||||
/@ampproject/remapping@2.2.1:
|
||||
@@ -2862,7 +2862,7 @@ packages:
|
||||
vitest:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@adobe/css-tools': 4.3.1
|
||||
'@adobe/css-tools': 4.3.2
|
||||
'@babel/runtime': 7.22.11
|
||||
'@types/jest': 29.5.5
|
||||
aria-query: 5.3.0
|
||||
@@ -10245,10 +10245,10 @@ packages:
|
||||
resolution: {integrity: sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg==}
|
||||
dev: true
|
||||
|
||||
/react-i18next@12.3.1(i18next@23.6.0)(react-dom@17.0.2)(react@17.0.2):
|
||||
resolution: {integrity: sha512-5v8E2XjZDFzK7K87eSwC7AJcAkcLt5xYZ4+yTPDAW1i7C93oOY1dnr4BaQM7un4Hm+GmghuiPvevWwlca5PwDA==}
|
||||
/react-i18next@13.5.0(i18next@23.6.0)(react-dom@17.0.2)(react@17.0.2):
|
||||
resolution: {integrity: sha512-CFJ5NDGJ2MUyBohEHxljOq/39NQ972rh1ajnadG9BjTk+UXbHLq4z5DKEbEQBDoIhUmmbuS/fIMJKo6VOax1HA==}
|
||||
peerDependencies:
|
||||
i18next: '>= 19.0.0'
|
||||
i18next: '>= 23.2.3'
|
||||
react: '>= 16.8.0'
|
||||
react-dom: '*'
|
||||
react-native: '*'
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2023-11-14 00:37+0000\n"
|
||||
"POT-Creation-Date: 2023-12-04 00:53+0000\n"
|
||||
"PO-Revision-Date: 2023-04-19 11:11+0000\n"
|
||||
"Last-Translator: Begüm Topyıldız <bgmtpyldz@gmail.com>, 2023\n"
|
||||
"Language-Team: Turkish (https://app.transifex.com/owncloud-org/teams/6149/tr/)\n"
|
||||
|
||||
@@ -13,9 +13,7 @@ type Config struct {
|
||||
GRPC GRPC `yaml:"grpc"`
|
||||
Service Service `yaml:"-"`
|
||||
Debug Debug `yaml:"debug"`
|
||||
TokenManager *TokenManager `yaml:"token_manager"`
|
||||
Events Events `yaml:"events"`
|
||||
Reva *shared.Reva `yaml:"reva"`
|
||||
GRPCClientTLS *shared.GRPCClientTLS `yaml:"grpc_client_tls"`
|
||||
Context context.Context `yaml:"-"`
|
||||
Log *Log `yaml:"log"`
|
||||
|
||||
@@ -3,7 +3,6 @@ package defaults
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/shared"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/structs"
|
||||
"github.com/owncloud/ocis/v2/services/policies/pkg/config"
|
||||
)
|
||||
@@ -32,7 +31,6 @@ func DefaultConfig() *config.Config {
|
||||
Addr: "127.0.0.1:9125",
|
||||
Namespace: "com.owncloud.api",
|
||||
},
|
||||
Reva: shared.DefaultRevaConfig(),
|
||||
Events: config.Events{
|
||||
Endpoint: "127.0.0.1:9233",
|
||||
Cluster: "ocis-cluster",
|
||||
@@ -45,23 +43,6 @@ func DefaultConfig() *config.Config {
|
||||
}
|
||||
|
||||
func EnsureDefaults(cfg *config.Config) {
|
||||
if cfg.TokenManager == nil && cfg.Commons != nil && cfg.Commons.TokenManager != nil {
|
||||
cfg.TokenManager = &config.TokenManager{
|
||||
JWTSecret: cfg.Commons.TokenManager.JWTSecret,
|
||||
}
|
||||
} else if cfg.TokenManager == nil {
|
||||
cfg.TokenManager = &config.TokenManager{}
|
||||
}
|
||||
|
||||
if cfg.Reva == nil && cfg.Commons != nil && cfg.Commons.Reva != nil {
|
||||
cfg.Reva = &shared.Reva{
|
||||
Address: cfg.Commons.Reva.Address,
|
||||
TLS: cfg.Commons.Reva.TLS,
|
||||
}
|
||||
} else if cfg.Reva == nil {
|
||||
cfg.Reva = &shared.Reva{}
|
||||
}
|
||||
|
||||
if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
|
||||
cfg.Log = &config.Log{
|
||||
Level: cfg.Commons.Log.Level,
|
||||
|
||||
@@ -4,7 +4,6 @@ import (
|
||||
"errors"
|
||||
|
||||
ociscfg "github.com/owncloud/ocis/v2/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/shared"
|
||||
"github.com/owncloud/ocis/v2/services/policies/pkg/config"
|
||||
"github.com/owncloud/ocis/v2/services/policies/pkg/config/defaults"
|
||||
|
||||
@@ -34,9 +33,5 @@ func ParseConfig(cfg *config.Config) error {
|
||||
}
|
||||
|
||||
func Validate(cfg *config.Config) error {
|
||||
if cfg.TokenManager.JWTSecret == "" {
|
||||
return shared.MissingJWTTokenError(cfg.Service.Name)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
@@ -4,7 +4,6 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/owncloud/ocis/v2/services/proxy/pkg/user/backend"
|
||||
"github.com/owncloud/ocis/v2/services/proxy/pkg/userroles"
|
||||
@@ -43,19 +42,6 @@ type accountResolver struct {
|
||||
userCS3Claim string
|
||||
}
|
||||
|
||||
// from https://codereview.stackexchange.com/a/280193
|
||||
func splitWithEscaping(s string, separator string, escapeString string) []string {
|
||||
a := strings.Split(s, separator)
|
||||
|
||||
for i := len(a) - 2; i >= 0; i-- {
|
||||
if strings.HasSuffix(a[i], escapeString) {
|
||||
a[i] = a[i][:len(a[i])-len(escapeString)] + separator + a[i+1]
|
||||
a = append(a[:i+1], a[i+2:]...)
|
||||
}
|
||||
}
|
||||
return a
|
||||
}
|
||||
|
||||
func readUserIDClaim(path string, claims map[string]interface{}) (string, error) {
|
||||
// happy path
|
||||
value, _ := claims[path].(string)
|
||||
@@ -64,7 +50,7 @@ func readUserIDClaim(path string, claims map[string]interface{}) (string, error)
|
||||
}
|
||||
|
||||
// try splitting path at .
|
||||
segments := splitWithEscaping(path, ".", "\\")
|
||||
segments := oidc.SplitWithEscaping(path, ".", "\\")
|
||||
subclaims := claims
|
||||
lastSegment := len(segments) - 1
|
||||
for i := range segments {
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
cs3 "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
|
||||
"github.com/cs3org/reva/v2/pkg/utils"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/middleware"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/oidc"
|
||||
settingssvc "github.com/owncloud/ocis/v2/protogen/gen/ocis/services/settings/v0"
|
||||
"go-micro.dev/v4/metadata"
|
||||
)
|
||||
@@ -29,6 +30,45 @@ func NewOIDCRoleAssigner(opts ...Option) UserRoleAssigner {
|
||||
}
|
||||
}
|
||||
|
||||
func extractRoles(rolesClaim string, claims map[string]interface{}) (map[string]struct{}, error) {
|
||||
|
||||
claimRoles := map[string]struct{}{}
|
||||
// happy path
|
||||
value, _ := claims[rolesClaim].(string)
|
||||
if value != "" {
|
||||
claimRoles[value] = struct{}{}
|
||||
return claimRoles, nil
|
||||
}
|
||||
|
||||
claim, err := oidc.WalkSegments(oidc.SplitWithEscaping(rolesClaim, ".", "\\"), claims)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
switch v := claim.(type) {
|
||||
case []string:
|
||||
for _, cr := range v {
|
||||
claimRoles[cr] = struct{}{}
|
||||
}
|
||||
case []interface{}:
|
||||
for _, cri := range v {
|
||||
cr, ok := cri.(string)
|
||||
if !ok {
|
||||
err := errors.New("invalid role in claims")
|
||||
return nil, err
|
||||
}
|
||||
|
||||
claimRoles[cr] = struct{}{}
|
||||
}
|
||||
case string:
|
||||
claimRoles[v] = struct{}{}
|
||||
default:
|
||||
return nil, errors.New("no roles in user claims")
|
||||
}
|
||||
|
||||
return claimRoles, nil
|
||||
}
|
||||
|
||||
// UpdateUserRoleAssignment assigns the role "User" to the supplied user. Unless the user
|
||||
// already has a different role assigned.
|
||||
func (ra oidcRoleAssigner) UpdateUserRoleAssignment(ctx context.Context, user *cs3.User, claims map[string]interface{}) (*cs3.User, error) {
|
||||
@@ -39,23 +79,10 @@ func (ra oidcRoleAssigner) UpdateUserRoleAssignment(ctx context.Context, user *c
|
||||
return nil, err
|
||||
}
|
||||
|
||||
claimRolesRaw, ok := claims[ra.rolesClaim].([]interface{})
|
||||
if !ok {
|
||||
logger.Error().Str("rolesClaim", ra.rolesClaim).Msg("No roles in user claims")
|
||||
return nil, errors.New("no roles in user claims")
|
||||
}
|
||||
|
||||
logger.Debug().Str("rolesClaim", ra.rolesClaim).Interface("rolesInClaim", claims[ra.rolesClaim]).Msg("got roles in claim")
|
||||
claimRoles := map[string]struct{}{}
|
||||
for _, cri := range claimRolesRaw {
|
||||
cr, ok := cri.(string)
|
||||
if !ok {
|
||||
err := errors.New("invalid role in claims")
|
||||
logger.Error().Err(err).Interface("claimValue", cri).Msg("Is not a valid string.")
|
||||
return nil, err
|
||||
}
|
||||
|
||||
claimRoles[cr] = struct{}{}
|
||||
claimRoles, err := extractRoles(ra.rolesClaim, claims)
|
||||
if err != nil {
|
||||
logger.Error().Err(err).Msg("Error mapping role names to role ids")
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(claimRoles) == 0 {
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
package userroles
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestExtractRolesArray(t *testing.T) {
|
||||
byt := []byte(`{"roles":["a","b"]}`)
|
||||
|
||||
claims := map[string]interface{}{}
|
||||
err := json.Unmarshal(byt, &claims)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
roles, err := extractRoles("roles", claims)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if _, ok := roles["a"]; !ok {
|
||||
t.Fatal("must contain 'a'")
|
||||
}
|
||||
if _, ok := roles["b"]; !ok {
|
||||
t.Fatal("must contain 'b'")
|
||||
}
|
||||
}
|
||||
|
||||
func TestExtractRolesString(t *testing.T) {
|
||||
byt := []byte(`{"roles":"a"}`)
|
||||
|
||||
claims := map[string]interface{}{}
|
||||
err := json.Unmarshal(byt, &claims)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
roles, err := extractRoles("roles", claims)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if _, ok := roles["a"]; !ok {
|
||||
t.Fatal("must contain 'a'")
|
||||
}
|
||||
}
|
||||
|
||||
func TestExtractRolesPathArray(t *testing.T) {
|
||||
byt := []byte(`{"sub":{"roles":["a","b"]}}`)
|
||||
|
||||
claims := map[string]interface{}{}
|
||||
err := json.Unmarshal(byt, &claims)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
roles, err := extractRoles("sub.roles", claims)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if _, ok := roles["a"]; !ok {
|
||||
t.Fatal("must contain 'a'")
|
||||
}
|
||||
if _, ok := roles["b"]; !ok {
|
||||
t.Fatal("must contain 'b'")
|
||||
}
|
||||
}
|
||||
|
||||
func TestExtractRolesPathString(t *testing.T) {
|
||||
byt := []byte(`{"sub":{"roles":"a"}}`)
|
||||
|
||||
claims := map[string]interface{}{}
|
||||
err := json.Unmarshal(byt, &claims)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
roles, err := extractRoles("sub.roles", claims)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if _, ok := roles["a"]; !ok {
|
||||
t.Fatal("must contain 'a'")
|
||||
}
|
||||
}
|
||||
|
||||
func TestExtractEscapedRolesPathString(t *testing.T) {
|
||||
byt := []byte(`{"sub.roles":"a"}`)
|
||||
|
||||
claims := map[string]interface{}{}
|
||||
err := json.Unmarshal(byt, &claims)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
roles, err := extractRoles("sub\\.roles", claims)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if _, ok := roles["a"]; !ok {
|
||||
t.Fatal("must contain 'a'")
|
||||
}
|
||||
}
|
||||
|
||||
func TestNoRoles(t *testing.T) {
|
||||
byt := []byte(`{"sub":{"foo":"a"}}`)
|
||||
|
||||
claims := map[string]interface{}{}
|
||||
err := json.Unmarshal(byt, &claims)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
roles, err := extractRoles("sub.roles", claims)
|
||||
if err == nil {
|
||||
t.Fatal("must not find a role")
|
||||
}
|
||||
if len(roles) != 0 {
|
||||
t.Fatal("length of roles mut be 0")
|
||||
}
|
||||
}
|
||||
@@ -3,11 +3,8 @@ 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"
|
||||
@@ -51,20 +48,21 @@ func ListUploads(cfg *config.Config) *cli.Command {
|
||||
return err
|
||||
}
|
||||
|
||||
managingFS, ok := fs.(storage.UploadsManager)
|
||||
managingFS, ok := fs.(storage.UploadSessionLister)
|
||||
if !ok {
|
||||
fmt.Fprintf(os.Stderr, "'%s' storage does not support listing expired uploads\n", cfg.Driver)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
uploads, err := managingFS.ListUploads()
|
||||
falseValue := false
|
||||
uploads, err := managingFS.ListUploadSessions(c.Context, storage.UploadSessionFilter{Expired: &falseValue})
|
||||
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"]))
|
||||
ref := u.Reference()
|
||||
fmt.Printf(" - %s (Space: %s, Name: %s, Size: %d/%d, Expires: %s, Processing: %t)\n", ref.GetResourceId().GetSpaceId(), u.ID(), u.Filename(), u.Offset(), u.Size(), u.Expires(), u.IsProcessing())
|
||||
}
|
||||
return nil
|
||||
},
|
||||
@@ -92,7 +90,7 @@ func PurgeExpiredUploads(cfg *config.Config) *cli.Command {
|
||||
return err
|
||||
}
|
||||
|
||||
managingFS, ok := fs.(storage.UploadsManager)
|
||||
managingFS, ok := fs.(storage.UploadSessionLister)
|
||||
if !ok {
|
||||
fmt.Fprintf(os.Stderr, "'%s' storage does not support clean expired uploads\n", cfg.Driver)
|
||||
os.Exit(1)
|
||||
@@ -100,18 +98,23 @@ func PurgeExpiredUploads(cfg *config.Config) *cli.Command {
|
||||
|
||||
wg := sync.WaitGroup{}
|
||||
wg.Add(1)
|
||||
purgedChannel := make(chan tusd.FileInfo)
|
||||
falseValue := false
|
||||
trueValue := false
|
||||
uploads, err := managingFS.ListUploadSessions(c.Context, storage.UploadSessionFilter{Expired: &trueValue, Processing: &falseValue})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
fmt.Println("Cleaned uploads:")
|
||||
fmt.Println("purging uploads:")
|
||||
go func() {
|
||||
for purged := range purgedChannel {
|
||||
fmt.Printf(" - %s (%s, Size: %d, Expires: %s)\n", purged.ID, purged.MetaData["filename"], purged.Size, expiredString(purged.MetaData["expires"]))
|
||||
for _, u := range uploads {
|
||||
ref := u.Reference()
|
||||
fmt.Printf(" - %s (Space: %s, Name: %s, Size: %d/%d, Expires: %s, Processing: %t)\n", ref.GetResourceId().GetSpaceId(), u.ID(), u.Filename(), u.Offset(), u.Size(), u.Expires(), u.IsProcessing())
|
||||
u.Purge(c.Context)
|
||||
}
|
||||
wg.Done()
|
||||
}()
|
||||
|
||||
err = managingFS.PurgeExpiredUploads(purgedChannel)
|
||||
close(purgedChannel)
|
||||
wg.Wait()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Failed to clean expired uploads '%s'\n", err)
|
||||
@@ -121,12 +124,3 @@ func PurgeExpiredUploads(cfg *config.Config) *cli.Command {
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
@@ -39,6 +39,22 @@ If a file type was not properly assigned or the type identification failed, thum
|
||||
|
||||
Thumbnails can either be generated as `png`, `jpg` or `gif` files. These types are hardcoded and no other types can be requested. A requestor, like another service or a client, can request one of the available types to be generated. If more than one type is required, each type must be requested individually.
|
||||
|
||||
## Thumbnail Query String Parameters
|
||||
|
||||
Clients can request thumbnail previews for files by adding `?preview=1` to the file URL. Requests for files with thumbnail availabe respond with HTTP status `404`.
|
||||
|
||||
The following query parameters are supported:
|
||||
|
||||
| Parameter | Required | Default Value | Description |
|
||||
| --------- | -------- | ---------------------------------------------------- | ------------------------------------------------------------------------------- |
|
||||
| preview | YES | 1 | generates preview |
|
||||
| x | YES | first x-value configured in `THUMBNAILS_RESOLUTIONS` | horizontal target size |
|
||||
| y | YES | first y-value configured in `THUMBNAILS_RESOLUTIONS` | vertical target size |
|
||||
| scalingup | NO | 0 | prevents upscaling of small images |
|
||||
| a | NO | 1 | aspect ratio |
|
||||
| c | NO | Caching string | Clients should send the etag, so they get a fresh thumbnail after a file change |
|
||||
| processor | NO | `resize` for gif's and `thumbnail` for all others | preferred thumbnail processor |
|
||||
|
||||
## Thumbnail Resolution
|
||||
|
||||
Various resolutions can be defined via `THUMBNAILS_RESOLUTIONS`. A requestor can request any arbitrary resolution and the thumbnail service will use the one closest to the requested resolution. If more than one resolution is required, each resolution must be requested individually.
|
||||
@@ -54,10 +70,10 @@ Returned: 15x10
|
||||
Normally, an image might get cropped when creating a preview, depending on the aspect ratio of the original image. This can have negative
|
||||
impacts on previews as only a part of the image will be shown. When using an _optional_ processor in the request, cropping can be avoided by defining on how the preview image generation will be done. The following processors are available:
|
||||
|
||||
* `resize`
|
||||
* `fit`
|
||||
* `fill`
|
||||
* `thumbnail`
|
||||
* `resize` resizes the image to the specified width and height and returns the transformed image. If one of width or height is 0, the image aspect ratio is preserved.
|
||||
* `fit` scales down the image to fit the specified maximum width and height and returns the transformed image.
|
||||
* `fill`: creates an image with the specified dimensions and fills it with the scaled source image. To achieve the correct aspect ratio without stretching, the source image will be cropped.
|
||||
* `thumbnail` scales the image up or down, crops it to the specified width and hight and returns the transformed image.
|
||||
|
||||
To apply one of those, a query parameter has to be added to the request, like `?processor=fit`. If no query parameter or processor is added, the default behaviour applies which is `resize` for gif's and `thumbnail` for all others.
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2023-11-12 00:04+0000\n"
|
||||
"POT-Creation-Date: 2023-12-04 00:53+0000\n"
|
||||
"PO-Revision-Date: 2023-03-15 08:28+0000\n"
|
||||
"Last-Translator: Martin Zhekov <martin03staff@gmail.com>, 2023\n"
|
||||
"Language-Team: Bulgarian (Bulgaria) (https://app.transifex.com/owncloud-org/teams/6149/bg_BG/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2023-11-12 00:04+0000\n"
|
||||
"POT-Creation-Date: 2023-12-04 00:53+0000\n"
|
||||
"PO-Revision-Date: 2023-03-15 08:28+0000\n"
|
||||
"Last-Translator: Hugo Blackwood, 2023\n"
|
||||
"Language-Team: Korean (https://app.transifex.com/owncloud-org/teams/6149/ko/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2023-11-13 00:30+0000\n"
|
||||
"POT-Creation-Date: 2023-12-04 00:53+0000\n"
|
||||
"PO-Revision-Date: 2023-03-15 08:28+0000\n"
|
||||
"Last-Translator: Flávio Veras <flaviove@gmail.com>, 2023\n"
|
||||
"Language-Team: Portuguese (Brazil) (https://app.transifex.com/owncloud-org/teams/6149/pt_BR/)\n"
|
||||
|
||||
@@ -11,7 +11,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: EMAIL\n"
|
||||
"POT-Creation-Date: 2023-11-13 00:30+0000\n"
|
||||
"POT-Creation-Date: 2023-12-04 00:53+0000\n"
|
||||
"PO-Revision-Date: 2023-03-15 08:28+0000\n"
|
||||
"Last-Translator: Besnik Bleta <besnik@programeshqip.org>, 2023\n"
|
||||
"Language-Team: Albanian (https://app.transifex.com/owncloud-org/teams/6149/sq/)\n"
|
||||
|
||||
Loaded 100 of 333 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user