From 8d1ba0244c3203c9bd2ac05b683d01afe885fc8d Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Wed, 10 Apr 2024 16:15:58 +0200 Subject: [PATCH] fix: ocs config was connected incorrectly --- services/frontend/pkg/config/config.go | 1 + services/frontend/pkg/config/defaults/defaultconfig.go | 1 + services/frontend/pkg/revaconfig/config.go | 3 ++- services/ocs/pkg/config/config.go | 3 +-- services/ocs/pkg/config/defaults/defaultconfig.go | 3 --- services/ocs/pkg/config/reva.go | 4 ---- 6 files changed, 5 insertions(+), 10 deletions(-) diff --git a/services/frontend/pkg/config/config.go b/services/frontend/pkg/config/config.go index 9cae9ab91..bfb61f899 100644 --- a/services/frontend/pkg/config/config.go +++ b/services/frontend/pkg/config/config.go @@ -145,6 +145,7 @@ type OCS struct { PublicShareMustHavePassword bool `yaml:"public_sharing_share_must_have_password" env:"OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD;FRONTEND_OCS_PUBLIC_SHARE_MUST_HAVE_PASSWORD" desc:"Set this to true if you want to enforce passwords on all public shares." introductionVersion:"5.0"` WriteablePublicShareMustHavePassword bool `yaml:"public_sharing_writeableshare_must_have_password" env:"OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD;FRONTEND_OCS_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD" desc:"Set this to true if you want to enforce passwords on Uploader, Editor or Contributor shares." introductionVersion:"5.0"` IncludeOCMSharees bool `yaml:"include_ocm_sharees" env:"FRONTEND_OCS_INCLUDE_OCM_SHAREES" desc:"Include OCM sharees when listing sharees." introductionVersion:"5.0"` + ShowUserEmailInResults bool `yaml:"show_email_in_results" env:"FRONTEND_SHOW_USER_EMAIL_IN_RESULTS;OCIS_SHOW_USER_EMAIL_IN_RESULTS" desc:"Mask user email addresses in responses. (EXPERIMENTAL)" introductionVersion:"5.1"` } type CacheWarmupDrivers struct { diff --git a/services/frontend/pkg/config/defaults/defaultconfig.go b/services/frontend/pkg/config/defaults/defaultconfig.go index 5a9b81c9a..ae99b4aad 100644 --- a/services/frontend/pkg/config/defaults/defaultconfig.go +++ b/services/frontend/pkg/config/defaults/defaultconfig.go @@ -116,6 +116,7 @@ func DefaultConfig() *config.Config { ListOCMShares: true, PublicShareMustHavePassword: true, IncludeOCMSharees: false, + ShowUserEmailInResults: true, }, Middleware: config.Middleware{ Auth: config.Auth{ diff --git a/services/frontend/pkg/revaconfig/config.go b/services/frontend/pkg/revaconfig/config.go index 0b38abaab..922673778 100644 --- a/services/frontend/pkg/revaconfig/config.go +++ b/services/frontend/pkg/revaconfig/config.go @@ -339,7 +339,8 @@ func FrontendConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string "productversion": version.GetString(), }, }, - "include_ocm_sharees": cfg.OCS.IncludeOCMSharees, + "include_ocm_sharees": cfg.OCS.IncludeOCMSharees, + "show_email_in_results": cfg.OCS.ShowUserEmailInResults, }, }, }, diff --git a/services/ocs/pkg/config/config.go b/services/ocs/pkg/config/config.go index ed7a0ab96..4097ff4ef 100644 --- a/services/ocs/pkg/config/config.go +++ b/services/ocs/pkg/config/config.go @@ -19,8 +19,7 @@ type Config struct { Debug Debug `yaml:"debug"` HTTP HTTP `yaml:"http"` - API API `yaml:"api"` - + GRPCClientTLS *shared.GRPCClientTLS `yaml:"grpc_client_tls"` GrpcClient client.Client `yaml:"-"` diff --git a/services/ocs/pkg/config/defaults/defaultconfig.go b/services/ocs/pkg/config/defaults/defaultconfig.go index a665c78b2..6a9ebec58 100644 --- a/services/ocs/pkg/config/defaults/defaultconfig.go +++ b/services/ocs/pkg/config/defaults/defaultconfig.go @@ -44,9 +44,6 @@ func DefaultConfig() *config.Config { Nodes: []string{"127.0.0.1:9233"}, TTL: time.Hour * 12, }, - API: config.API{ - ShowUserEmailInResults: true, - }, } } diff --git a/services/ocs/pkg/config/reva.go b/services/ocs/pkg/config/reva.go index 05e8d8c8d..8413904da 100644 --- a/services/ocs/pkg/config/reva.go +++ b/services/ocs/pkg/config/reva.go @@ -4,7 +4,3 @@ package config type TokenManager struct { JWTSecret string `yaml:"jwt_secret" env:"OCIS_JWT_SECRET;OCS_JWT_SECRET" desc:"The secret to mint and validate jwt tokens." introductionVersion:"pre5.0"` } - -type API struct { - ShowUserEmailInResults bool `yaml:"show_email_in_results" env:"OCIS_SHOW_USER_EMAIL_IN_RESULTS" desc:"Mask user email addresses in responses. (EXPERIMENTAL)" introductionVersion:"5.1"` -}