From 5f818c6baef7ff1b986fa52cd09509111f0578a0 Mon Sep 17 00:00:00 2001 From: Ishank Arora Date: Thu, 7 Jan 2021 16:30:27 +0530 Subject: [PATCH] Add example --- changelog/unreleased/home-mapping.md | 4 +++- storage/pkg/flagset/gateway.go | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/changelog/unreleased/home-mapping.md b/changelog/unreleased/home-mapping.md index a502381b2d0..467dec70ba3 100644 --- a/changelog/unreleased/home-mapping.md +++ b/changelog/unreleased/home-mapping.md @@ -3,7 +3,9 @@ Enhancement: Functionality to map home directory to different storage providers We added a parameter in reva that allows us to redirect /home requests to different storage providers based on a mapping derived from the user attributes, which was previously not possible since we hardcode the /home path for all -users. This PR adds the config for that parameter. +users. For example, having its value as `/home/{{substr 0 1 .Username}}` can be +used to redirect home requests for different users to different storage +providers. https://github.com/owncloud/ocis/pull/1186 https://github.com/cs3org/reva/pull/1142 diff --git a/storage/pkg/flagset/gateway.go b/storage/pkg/flagset/gateway.go index 5c8279eb22c..cc7a546e176 100644 --- a/storage/pkg/flagset/gateway.go +++ b/storage/pkg/flagset/gateway.go @@ -100,7 +100,7 @@ func GatewayWithConfig(cfg *config.Config) []cli.Flag { &cli.StringFlag{ Name: "storage-home-mapping", Value: "", - Usage: "mapping template for user home paths to user-specific mount points", + Usage: "mapping template for user home paths to user-specific mount points, e.g. /home/{{substr 0 1 .Username}}", EnvVars: []string{"STORAGE_GATEWAY_HOME_MAPPING"}, Destination: &cfg.Reva.Gateway.HomeMapping, },