From 1024fe3e88047ab8cc614ccdcb7681ac4aa04cda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Thu, 24 Mar 2022 10:57:13 +0100 Subject: [PATCH] use publicstorage rewrite (#3349) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- changelog/unreleased/publicstorageprovider-rewrite.md | 5 +++++ go.mod | 2 +- go.sum | 4 ++-- storage/pkg/command/gateway.go | 8 ++++++-- 4 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 changelog/unreleased/publicstorageprovider-rewrite.md diff --git a/changelog/unreleased/publicstorageprovider-rewrite.md b/changelog/unreleased/publicstorageprovider-rewrite.md new file mode 100644 index 0000000000..800b0d0f80 --- /dev/null +++ b/changelog/unreleased/publicstorageprovider-rewrite.md @@ -0,0 +1,5 @@ +Bugfix: replace public mountpoint fileid with grant fileid + +We now show the same resoucre id for resources when accessing them via a public links as when using a logged in user. This allows the web ui to start a WOPI session with the correct resource id. + +https://github.com/owncloud/ocis/pull/3349 diff --git a/go.mod b/go.mod index 40c460bc9d..9415e5d13f 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( github.com/blevesearch/bleve/v2 v2.3.1 github.com/coreos/go-oidc/v3 v3.1.0 github.com/cs3org/go-cs3apis v0.0.0-20220126114148-64c025ccdd19 - github.com/cs3org/reva/v2 v2.0.0-20220321093112-25cedab9f739 + github.com/cs3org/reva/v2 v2.0.0-20220324071330-5bbdbf17c339 github.com/disintegration/imaging v1.6.2 github.com/glauth/glauth/v2 v2.0.0-20211021011345-ef3151c28733 github.com/go-chi/chi/v5 v5.0.7 diff --git a/go.sum b/go.sum index eac537abe0..d099f0aaf8 100644 --- a/go.sum +++ b/go.sum @@ -335,8 +335,8 @@ github.com/crewjam/saml v0.4.6/go.mod h1:ZBOXnNPFzB3CgOkRm7Nd6IVdkG+l/wF+0ZXLqD9 github.com/cs3org/cato v0.0.0-20200828125504-e418fc54dd5e/go.mod h1:XJEZ3/EQuI3BXTp/6DUzFr850vlxq11I6satRtz0YQ4= github.com/cs3org/go-cs3apis v0.0.0-20220126114148-64c025ccdd19 h1:1jqPH58jCxvbaJ9WLIJ7W2/m622bWS6ChptzljSG6IQ= github.com/cs3org/go-cs3apis v0.0.0-20220126114148-64c025ccdd19/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY= -github.com/cs3org/reva/v2 v2.0.0-20220321093112-25cedab9f739 h1:GD8ZoMqRKclM0dP5hjSMXals9vRWHPH2hOeBruCuQlg= -github.com/cs3org/reva/v2 v2.0.0-20220321093112-25cedab9f739/go.mod h1:XNtK1HEClNzmz5vyQa2DUw4KH3oqBjQoEsV1LhAGlV0= +github.com/cs3org/reva/v2 v2.0.0-20220324071330-5bbdbf17c339 h1:87SSTW39Ub8h9NmPA4oBJfv4R82NmGh8h8enymWxzPM= +github.com/cs3org/reva/v2 v2.0.0-20220324071330-5bbdbf17c339/go.mod h1:XNtK1HEClNzmz5vyQa2DUw4KH3oqBjQoEsV1LhAGlV0= github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8 h1:Z9lwXumT5ACSmJ7WGnFl+OMLLjpz5uR2fyz7dC255FI= github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8/go.mod h1:4abs/jPXcmJzYoYGF91JF9Uq9s/KL5n1jvFDix8KcqY= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= diff --git a/storage/pkg/command/gateway.go b/storage/pkg/command/gateway.go index b1f50b0f53..0001637aa5 100644 --- a/storage/pkg/command/gateway.go +++ b/storage/pkg/command/gateway.go @@ -253,8 +253,12 @@ func spacesProviders(cfg *config.Config, logger log.Logger) map[string]map[strin // public link storage returns the mount id of the actual storage cfg.Reva.StoragePublicLink.Endpoint: { "spaces": map[string]interface{}{ - "public": map[string]interface{}{ - "mount_point": "/public", + "grant": map[string]interface{}{ + "mount_point": ".", + }, + "mountpoint": map[string]interface{}{ + "mount_point": "/public", + "path_template": "/public/{{.Space.Root.OpaqueId}}", }, }, },