diff --git a/changelog/unreleased/favorites-capability.md b/changelog/unreleased/favorites-capability.md new file mode 100644 index 0000000000..8a438bc0a4 --- /dev/null +++ b/changelog/unreleased/favorites-capability.md @@ -0,0 +1,5 @@ +Enhancement: Favorites capability + +We've added a capability for the storage frontend which can be used to announce to clients whether or not favorites are supported. By default this is disabled because the listing of favorites doesn't survive service restarts at the moment. + +https://github.com/owncloud/ocis/pull/2599 diff --git a/storage/pkg/command/frontend.go b/storage/pkg/command/frontend.go index 96566f55f7..96f3364195 100644 --- a/storage/pkg/command/frontend.go +++ b/storage/pkg/command/frontend.go @@ -83,6 +83,7 @@ func Frontend(cfg *config.Config) *cli.Command { "versioning": true, "archivers": archivers, "app_providers": appProviders, + "favorites": cfg.Reva.Frontend.Favorites, } if cfg.Reva.DefaultUploadProtocol == "tus" { diff --git a/storage/pkg/config/config.go b/storage/pkg/config/config.go index 7d34e71871..e6be589346 100644 --- a/storage/pkg/config/config.go +++ b/storage/pkg/config/config.go @@ -149,6 +149,7 @@ type FrontendPort struct { AppProviderPrefix string ArchiverPrefix string DatagatewayPrefix string + Favorites bool OCDavPrefix string OCSPrefix string OCSSharePrefix string diff --git a/storage/pkg/flagset/frontend.go b/storage/pkg/flagset/frontend.go index e7329dba91..51c7aeb366 100644 --- a/storage/pkg/flagset/frontend.go +++ b/storage/pkg/flagset/frontend.go @@ -129,6 +129,13 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag { EnvVars: []string{"STORAGE_FRONTEND_DATAGATEWAY_PREFIX"}, Destination: &cfg.Reva.Frontend.DatagatewayPrefix, }, + &cli.BoolFlag{ + Name: "favorites", + Value: flags.OverrideDefaultBool(cfg.Reva.Frontend.Favorites, false), + Usage: "announces favorites support to clients", + EnvVars: []string{"STORAGE_FRONTEND_FAVORITES"}, + Destination: &cfg.Reva.Frontend.Favorites, + }, &cli.StringFlag{ Name: "ocdav-prefix", Value: flags.OverrideDefaultString(cfg.Reva.Frontend.OCDavPrefix, ""),