From 78be28433a406861cd78ef3dc4a088ffa4ccd20b Mon Sep 17 00:00:00 2001 From: Michael Barz Date: Thu, 20 Oct 2022 14:13:45 +0200 Subject: [PATCH] disable federation capabilities --- .../unreleased/federation-capabilities.md | 5 +++++ go.mod | 2 +- go.sum | 4 ++-- services/frontend/pkg/config/config.go | 18 ++++++++++-------- services/frontend/pkg/revaconfig/config.go | 5 +++-- 5 files changed, 21 insertions(+), 13 deletions(-) create mode 100644 changelog/unreleased/federation-capabilities.md diff --git a/changelog/unreleased/federation-capabilities.md b/changelog/unreleased/federation-capabilities.md new file mode 100644 index 000000000..1dfc9607f --- /dev/null +++ b/changelog/unreleased/federation-capabilities.md @@ -0,0 +1,5 @@ +Bugfix: Disable federation capabilities + +We disabled the federation support in the capabilities because it is currently not supported. + +https://github.com/owncloud/ocis/pull/4864 diff --git a/go.mod b/go.mod index 2e9c21ede..00976d148 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/blevesearch/bleve/v2 v2.3.4 github.com/coreos/go-oidc/v3 v3.4.0 github.com/cs3org/go-cs3apis v0.0.0-20221012090518-ef2996678965 - github.com/cs3org/reva/v2 v2.10.1-0.20221018105730-203cc6b50853 + github.com/cs3org/reva/v2 v2.10.1-0.20221020120219-2482ef11bdef github.com/disintegration/imaging v1.6.2 github.com/ggwhite/go-masker v1.0.9 github.com/go-chi/chi/v5 v5.0.7 diff --git a/go.sum b/go.sum index 8f793147d..108e783d0 100644 --- a/go.sum +++ b/go.sum @@ -351,8 +351,8 @@ github.com/crewjam/saml v0.4.6 h1:XCUFPkQSJLvzyl4cW9OvpWUbRf0gE7VUpU8ZnilbeM4= github.com/crewjam/saml v0.4.6/go.mod h1:ZBOXnNPFzB3CgOkRm7Nd6IVdkG+l/wF+0ZXLqD96t1A= github.com/cs3org/go-cs3apis v0.0.0-20221012090518-ef2996678965 h1:y4n2j68LLnvac+zw/al8MfPgO5aQiIwLmHM/JzYN8AM= github.com/cs3org/go-cs3apis v0.0.0-20221012090518-ef2996678965/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY= -github.com/cs3org/reva/v2 v2.10.1-0.20221018105730-203cc6b50853 h1:vBj1DJMiFXIvxf+5xEXXlF1YP4kS04XSqWMr0R6qMLU= -github.com/cs3org/reva/v2 v2.10.1-0.20221018105730-203cc6b50853/go.mod h1:lq+LRpBDYU1vHUmJDeK7sGquREciO8GDj5/SYIibMPY= +github.com/cs3org/reva/v2 v2.10.1-0.20221020120219-2482ef11bdef h1:3w1/KfXfouh1gZXfwYAtYyAAfcCrlooWw60OcXsiyoU= +github.com/cs3org/reva/v2 v2.10.1-0.20221020120219-2482ef11bdef/go.mod h1:lq+LRpBDYU1vHUmJDeK7sGquREciO8GDj5/SYIibMPY= github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8 h1:Z9lwXumT5ACSmJ7WGnFl+OMLLjpz5uR2fyz7dC255FI= github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8/go.mod h1:4abs/jPXcmJzYoYGF91JF9Uq9s/KL5n1jvFDix8KcqY= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= diff --git a/services/frontend/pkg/config/config.go b/services/frontend/pkg/config/config.go index 2d6e5fc95..e94317539 100644 --- a/services/frontend/pkg/config/config.go +++ b/services/frontend/pkg/config/config.go @@ -25,14 +25,16 @@ type Config struct { SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"FRONTEND_SKIP_USER_GROUPS_IN_TOKEN" desc:"Disables the loading of user's group memberships from the reva access token."` - EnableFavorites bool `yaml:"enable_favorites" env:"FRONTEND_ENABLE_FAVORITES" desc:"Enables the support for favorites in the frontend."` - EnableProjectSpaces bool `yaml:"enable_project_spaces" env:"FRONTEND_ENABLE_PROJECT_SPACES" desc:"Indicates to clients that project spaces are supposed to be made available."` - EnableShareJail bool `yaml:"enable_share_jail" env:"FRONTEND_ENABLE_SHARE_JAIL" desc:"Indicates to clients that the share jail is supposed to be used."` - UploadMaxChunkSize int `yaml:"upload_max_chunk_size" env:"FRONTEND_UPLOAD_MAX_CHUNK_SIZE" desc:"Sets the max chunk sizes in bytes 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:"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."` + EnableFavorites bool `yaml:"enable_favorites" env:"FRONTEND_ENABLE_FAVORITES" desc:"Enables the support for favorites in the frontend."` + EnableProjectSpaces bool `yaml:"enable_project_spaces" env:"FRONTEND_ENABLE_PROJECT_SPACES" desc:"Indicates to clients that project spaces are supposed to be made available."` + EnableShareJail bool `yaml:"enable_share_jail" env:"FRONTEND_ENABLE_SHARE_JAIL" desc:"Indicates to clients that the share jail is supposed to be used."` + UploadMaxChunkSize int `yaml:"upload_max_chunk_size" env:"FRONTEND_UPLOAD_MAX_CHUNK_SIZE" desc:"Sets the max chunk sizes in bytes 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:"Enables the support for resharing in the frontend."` + EnableFederatedSharingIncoming bool `yaml:"enable_federated_sharing_incoming" env:"FRONTEND_ENABLE_FEDERATED_SHARING_INCOMING" desc:"Enables the support for federated sharing (incoming) in the clients. This does not change the backend behavior."` + EnableFederatedSharingOutgoing bool `yaml:"enable_federated_sharing_outgoing" env:"FRONTEND_ENABLE_FEDERATED_SHARING_OUTGOING" desc:"Enables the support for federated sharing (outgoing) in the clients. This does not change the backend behavior."` + 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."` diff --git a/services/frontend/pkg/revaconfig/config.go b/services/frontend/pkg/revaconfig/config.go index 5bd573bef..7d98a1b6d 100644 --- a/services/frontend/pkg/revaconfig/config.go +++ b/services/frontend/pkg/revaconfig/config.go @@ -196,6 +196,7 @@ func FrontendConfigFromStruct(cfg *config.Config) (map[string]interface{}, error "api_enabled": true, "resharing": cfg.EnableResharing, "group_sharing": true, + "sharing_roles": true, "auto_accept_share": true, "share_with_group_members_only": true, "share_with_membership_groups_only": true, @@ -238,8 +239,8 @@ func FrontendConfigFromStruct(cfg *config.Config) (map[string]interface{}, error "group_members_only": true, }, "federation": map[string]interface{}{ - "outgoing": true, - "incoming": true, + "outgoing": cfg.EnableFederatedSharingOutgoing, + "incoming": cfg.EnableFederatedSharingIncoming, }, }, "spaces": map[string]interface{}{