From bc48fbdf81e77c411b3b5cc2279fd8c4f6885a17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Mon, 19 Feb 2024 12:49:08 +0100 Subject: [PATCH] Deprecate sharing cs3 backends (#8478) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jörn Friedrich Dreyer --- changelog/unreleased/deprecate-sharing-cs3-backends.md | 5 +++++ ocis/pkg/command/migrate.go | 4 ++-- services/sharing/pkg/config/config.go | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 changelog/unreleased/deprecate-sharing-cs3-backends.md diff --git a/changelog/unreleased/deprecate-sharing-cs3-backends.md b/changelog/unreleased/deprecate-sharing-cs3-backends.md new file mode 100644 index 0000000000..d9e3e63c35 --- /dev/null +++ b/changelog/unreleased/deprecate-sharing-cs3-backends.md @@ -0,0 +1,5 @@ +Change: Deprecate sharing cs3 backends + +The `cs3` user and public sharing drivers have already been replaced by `jsoncs3`. We now mark them as deprecated in preparation to kill a lot of unused code in reva. + +https://github.com/owncloud/ocis/pull/8478 diff --git a/ocis/pkg/command/migrate.go b/ocis/pkg/command/migrate.go index 7c16f207c3..319cc83500 100644 --- a/ocis/pkg/command/migrate.go +++ b/ocis/pkg/command/migrate.go @@ -308,7 +308,7 @@ func MigrateShares(cfg *config.Config) *cli.Command { }, &cli.StringFlag{ Name: "to", - Value: "cs3", + Value: "jsoncs3", Usage: "Share manager to import the data into", }, }, @@ -403,7 +403,7 @@ func MigratePublicShares(cfg *config.Config) *cli.Command { }, &cli.StringFlag{ Name: "to", - Value: "cs3", + Value: "jsoncs3", Usage: "Public share manager to import the data into", }, }, diff --git a/services/sharing/pkg/config/config.go b/services/sharing/pkg/config/config.go index f7fc47b6d7..f537400349 100644 --- a/services/sharing/pkg/config/config.go +++ b/services/sharing/pkg/config/config.go @@ -21,9 +21,9 @@ type Config struct { SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"SHARING_SKIP_USER_GROUPS_IN_TOKEN" desc:"Disables the loading of user's group memberships from the reva access token."` - UserSharingDriver string `yaml:"user_sharing_driver" env:"SHARING_USER_DRIVER" desc:"Driver to be used to persist shares. Supported values are 'jsoncs3', 'json', 'cs3' and 'owncloudsql'."` + UserSharingDriver string `yaml:"user_sharing_driver" env:"SHARING_USER_DRIVER" desc:"Driver to be used to persist shares. Supported values are 'jsoncs3', 'json', 'cs3' (deprecated) and 'owncloudsql'."` UserSharingDrivers UserSharingDrivers `yaml:"user_sharing_drivers"` - PublicSharingDriver string `yaml:"public_sharing_driver" env:"SHARING_PUBLIC_DRIVER" desc:"Driver to be used to persist public shares. Supported values are 'jsoncs3', 'json' and 'cs3'."` + PublicSharingDriver string `yaml:"public_sharing_driver" env:"SHARING_PUBLIC_DRIVER" desc:"Driver to be used to persist public shares. Supported values are 'jsoncs3', 'json' and 'cs3' (deprecated)."` PublicSharingDrivers PublicSharingDrivers `yaml:"public_sharing_drivers"` WriteableShareMustHavePassword bool `yaml:"public_sharing_writeableshare_must_have_password" env:"OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD;SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD" desc:"Set this to true if you want to enforce passwords on Uploader, Editor or Contributor shares. If not using the global OCIS_SHARING_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD, you must define the FRONTEND_OCS_PUBLIC_WRITEABLE_SHARE_MUST_HAVE_PASSWORD in the frontend service."` PublicShareMustHavePassword bool `yaml:"public_sharing_share_must_have_password" env:"OCIS_SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD;SHARING_PUBLIC_SHARE_MUST_HAVE_PASSWORD" desc:"Set this to true if you want to enforce passwords on all public shares."`