mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-12 14:30:19 -05:00
Add config for setting search_min_length capability
This adds the "search_min_length" setting to the frontend service which allows to set the search_min_length capabilty which is e.g. used by web. Partial: #547
This commit is contained in:
committed by
Ralf Haferkamp
parent
8d454cfd3d
commit
288b76d955
@@ -32,6 +32,7 @@ type Config struct {
|
||||
UploadHTTPMethodOverride string `yaml:"upload_http_method_override" env:"FRONTEND_UPLOAD_HTTP_METHOD_OVERRIDE" desc:"Advise TUS to replace PATCH requests by POST requests."`
|
||||
DefaultUploadProtocol string `yaml:"default_upload_protocol" env:"FRONTEND_DEFAULT_UPLOAD_PROTOCOL" desc:"The default upload protocol to use in the frontend (e.g. tus)."`
|
||||
EnableResharing bool `yaml:"enable_resharing" env:"FRONTEND_ENABLE_RESHARING" desc:"Enables the support for resharing in the frontend."`
|
||||
SearchMinLength int `yaml:"search_min_length" env:"FRONTEND_SEARCH_MIN_LENGTH" desc:"Minimum number of characters to enter before starting a search for Sharees."`
|
||||
|
||||
PublicURL string `yaml:"public_url" env:"OCIS_URL;FRONTEND_PUBLIC_URL" desc:"The public facing URL of the oCIS frontend."`
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ func DefaultConfig() *config.Config {
|
||||
UploadHTTPMethodOverride: "",
|
||||
DefaultUploadProtocol: "tus",
|
||||
EnableResharing: true,
|
||||
SearchMinLength: 3,
|
||||
Checksums: config.Checksums{
|
||||
SupportedTypes: []string{"sha1", "md5", "adler32"},
|
||||
PreferredUploadType: "",
|
||||
|
||||
@@ -165,7 +165,7 @@ func FrontendConfigFromStruct(cfg *config.Config) map[string]interface{} {
|
||||
"share_with_group_members_only": true,
|
||||
"share_with_membership_groups_only": true,
|
||||
"default_permissions": 22,
|
||||
"search_min_length": 3,
|
||||
"search_min_length": cfg.SearchMinLength,
|
||||
"public": map[string]interface{}{
|
||||
"alias": true,
|
||||
"enabled": true,
|
||||
|
||||
Reference in New Issue
Block a user