Skip to content

Commit

Permalink
fix: ocs config was connected incorrectly
Browse files Browse the repository at this point in the history
  • Loading branch information
micbar committed Apr 10, 2024
1 parent 28b9530 commit 8d1ba02
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 10 deletions.
1 change: 1 addition & 0 deletions services/frontend/pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions services/frontend/pkg/config/defaults/defaultconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ func DefaultConfig() *config.Config {
ListOCMShares: true,
PublicShareMustHavePassword: true,
IncludeOCMSharees: false,
ShowUserEmailInResults: true,
},
Middleware: config.Middleware{
Auth: config.Auth{
Expand Down
3 changes: 2 additions & 1 deletion services/frontend/pkg/revaconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
},
},
Expand Down
3 changes: 1 addition & 2 deletions services/ocs/pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:"-"`

Expand Down
3 changes: 0 additions & 3 deletions services/ocs/pkg/config/defaults/defaultconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ func DefaultConfig() *config.Config {
Nodes: []string{"127.0.0.1:9233"},
TTL: time.Hour * 12,
},
API: config.API{
ShowUserEmailInResults: true,
},
}
}

Expand Down
4 changes: 0 additions & 4 deletions services/ocs/pkg/config/reva.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}

0 comments on commit 8d1ba02

Please sign in to comment.