add share prefix to ocs shared with me paths

Fixes: https://github.com/owncloud/product/issues/204
This commit is contained in:
David Christofas
2020-11-30 16:13:30 +01:00
parent a2cba4631f
commit 2f4faad754
14 changed files with 30 additions and 6 deletions

View File

@@ -3,7 +3,7 @@ module github.com/owncloud/ocis/storage
go 1.13
require (
github.com/cs3org/reva v1.4.1-0.20201130061320-ac85e68e0600
github.com/cs3org/reva v1.4.1-0.20201130150257-7e3efcbd0fc3
github.com/gofrs/uuid v3.3.0+incompatible
github.com/micro/cli/v2 v2.1.2
github.com/micro/go-micro/v2 v2.9.1

View File

@@ -218,6 +218,8 @@ github.com/cs3org/reva v1.4.1-0.20201127111856-e6a6212c1b7b h1:Bypxdf3vXwyEeL86M
github.com/cs3org/reva v1.4.1-0.20201127111856-e6a6212c1b7b/go.mod h1:MTBlfobTE8W2hgXQ9+r+75jpJa1TxD04IZm5TpS9H48=
github.com/cs3org/reva v1.4.1-0.20201130061320-ac85e68e0600 h1:4CKU+R4UNvILzsPrcAFwEbk/8Hc6vJqwO7SxK0gAm4I=
github.com/cs3org/reva v1.4.1-0.20201130061320-ac85e68e0600/go.mod h1:MTBlfobTE8W2hgXQ9+r+75jpJa1TxD04IZm5TpS9H48=
github.com/cs3org/reva v1.4.1-0.20201130150257-7e3efcbd0fc3 h1:H3QnP+eApE2LDJrYjJrIBmJ04KGVdpR2QP+ipdPp3jE=
github.com/cs3org/reva v1.4.1-0.20201130150257-7e3efcbd0fc3/go.mod h1:MTBlfobTE8W2hgXQ9+r+75jpJa1TxD04IZm5TpS9H48=
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=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=

View File

@@ -134,6 +134,7 @@ func Frontend(cfg *config.Config) *cli.Command {
"disable_tus": cfg.Reva.UploadDisableTus,
},
"ocs": map[string]interface{}{
"share_prefix": cfg.Reva.Frontend.OCSSharePrefix,
"prefix": cfg.Reva.Frontend.OCSPrefix,
"config": map[string]interface{}{
"version": "1.8",

View File

@@ -82,6 +82,7 @@ type FrontendPort struct {
DatagatewayPrefix string
OCDavPrefix string
OCSPrefix string
OCSSharePrefix string
PublicURL string
}

View File

@@ -100,7 +100,13 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"STORAGE_FRONTEND_OCS_PREFIX"},
Destination: &cfg.Reva.Frontend.OCSPrefix,
},
&cli.StringFlag{
Name: "ocs-share-prefix",
Value: "/Shares",
Usage: "the prefix prepended to the path of shared files",
EnvVars: []string{"STORAGE_FRONTEND_OCS_Share_PREFIX"},
Destination: &cfg.Reva.Frontend.OCSSharePrefix,
},
// Gateway
&cli.StringFlag{