Merge branch 'master' into MergeMasterIntoExperimental

This commit is contained in:
jkoberg committed 2022-08-10 15:41:12 +02:00
commit ab4d774205
38 files changed
+904 -272

No files matched your search

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