From bab74a02ff1b74679cf73f0baab118321914a476 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 22 Dec 2021 12:31:21 +0000 Subject: [PATCH] use explicit grant and mountpoint types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- storage/pkg/command/gateway.go | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/storage/pkg/command/gateway.go b/storage/pkg/command/gateway.go index f3b20a17d9..0dff38512b 100644 --- a/storage/pkg/command/gateway.go +++ b/storage/pkg/command/gateway.go @@ -234,7 +234,25 @@ func spacesProviders(cfg *config.Config, logger log.Logger) map[string]map[strin }, cfg.Reva.StorageShares.Endpoint: { "spaces": map[string]interface{}{ - "reference": map[string]interface{}{ + /* + "share": map[string]interface{}{ + // The jail needs to be filled with mount points + // .Space.Name is a path relative to the mount point + "mount_point": "/users/{{.CurrentUser.Id.OpaqueId}}/Shares", + "path_template": "/users/{{.CurrentUser.Id.OpaqueId}}/Shares/{{.Space.Name}}", + }, + */ + "virtual": map[string]interface{}{ + // The root of the share jail is mounted here + "mount_point": "/users/{{.CurrentUser.Id.OpaqueId}}/Shares", + }, + "grant": map[string]interface{}{ + // Grants are relative to a space root that the gateway will determine with a stat + "mount_point": ".", + }, + "mountpoint": map[string]interface{}{ + // The jail needs to be filled with mount points + // .Space.Name is a path relative to the mount point "mount_point": "/users/{{.CurrentUser.Id.OpaqueId}}/Shares", "path_template": "/users/{{.CurrentUser.Id.OpaqueId}}/Shares/{{.Space.Name}}", },