Merge pull request #4023 from owncloud/resharing-conf

add option to enable resharing
This commit is contained in:
Michael Barz
2022-06-23 16:13:19 +02:00
committed by GitHub
5 changed files with 12 additions and 1 deletions

View File

@@ -1576,6 +1576,7 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = [], depends_on =
user = "0:0"
environment = {
"OCIS_URL": OCIS_URL,
"FRONTEND_ENABLE_RESHARING": "true",
"GATEWAY_GRPC_ADDR": "0.0.0.0:9142", # cs3api-validator needs the cs3api gatway exposed
"STORAGE_USERS_DRIVER": "%s" % (storage),
"STORAGE_USERS_DRIVER_LOCAL_ROOT": "/srv/app/tmp/ocis/local/root",
@@ -1643,6 +1644,7 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = [], depends_on =
"OCIS_RUN_EXTENSIONS": "app-registry,app-provider,auth-basic,auth-bearer,auth-machine,frontend,gateway,graph,graph-explorer,groups,nats,notifications,ocdav,ocs,proxy,search,settings,sharing,storage-system,storage-publiclink,storage-shares,storage-users,store,thumbnails,users,web,webdav",
"OCIS_LOG_LEVEL": "info",
"OCIS_URL": OCIS_URL,
"FRONTEND_ENABLE_RESHARING": "true",
"OCIS_BASE_DATA_PATH": "/mnt/data/ocis",
"OCIS_CONFIG_DIR": "/etc/ocis",
"PROXY_ENABLE_BASIC_AUTH": "true",
@@ -2259,6 +2261,7 @@ def parallelAcceptance(env):
"OCIS_SKELETON_STRATEGY": "copy",
"SEND_SCENARIO_LINE_REFERENCES": "true",
"UPLOAD_DELETE_WAIT_TIME": "1",
"FRONTEND_ENABLE_RESHARING": "true",
}
environment.update(env)

View File

@@ -0,0 +1,6 @@
Enhancement: add FRONTEND_ENABLE_RESHARING env variable
We introduced resharing which was enabled by default, this is now configurable and can be enabled by setting the env `FRONTEND_ENABLE_RESHARING` to `true`.
By default resharing is now disabled.
https://github.com/owncloud/ocis/pull/4023

View File

@@ -31,6 +31,7 @@ type Config struct {
UploadMaxChunkSize int `yaml:"upload_max_chunk_size" env:"FRONTEND_UPLOAD_MAX_CHUNK_SIZE" desc:"Sets the max chunk sizes for uploads via the frontend." `
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:"Disables the support for resharing in the frontend."`
PublicURL string `yaml:"public_url" env:"OCIS_URL;FRONTEND_PUBLIC_URL" desc:"The public facing url of the ocis frontend."`

View File

@@ -38,6 +38,7 @@ func DefaultConfig() *config.Config {
UploadMaxChunkSize: 1e+8,
UploadHTTPMethodOverride: "",
DefaultUploadProtocol: "tus",
EnableResharing: false,
Checksums: config.Checksums{
SupportedTypes: []string{"sha1", "md5", "adler32"},
PreferredUploadType: "",

View File

@@ -159,7 +159,7 @@ func FrontendConfigFromStruct(cfg *config.Config) map[string]interface{} {
},
"files_sharing": map[string]interface{}{
"api_enabled": true,
"resharing": true,
"resharing": cfg.EnableResharing,
"group_sharing": true,
"auto_accept_share": true,
"share_with_group_members_only": true,