Add favorites capability

This commit is contained in:
Benedikt Kulmann
2021-10-08 19:37:48 +02:00
parent 5f0cf077ca
commit 489d0a5db3
4 changed files with 14 additions and 0 deletions
@@ -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
+1
View File
@@ -83,6 +83,7 @@ func Frontend(cfg *config.Config) *cli.Command {
"versioning": true, "versioning": true,
"archivers": archivers, "archivers": archivers,
"app_providers": appProviders, "app_providers": appProviders,
"favorites": cfg.Reva.Frontend.Favorites,
} }
if cfg.Reva.DefaultUploadProtocol == "tus" { if cfg.Reva.DefaultUploadProtocol == "tus" {
+1
View File
@@ -149,6 +149,7 @@ type FrontendPort struct {
AppProviderPrefix string AppProviderPrefix string
ArchiverPrefix string ArchiverPrefix string
DatagatewayPrefix string DatagatewayPrefix string
Favorites bool
OCDavPrefix string OCDavPrefix string
OCSPrefix string OCSPrefix string
OCSSharePrefix string OCSSharePrefix string
+7
View File
@@ -129,6 +129,13 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag {
EnvVars: []string{"STORAGE_FRONTEND_DATAGATEWAY_PREFIX"}, EnvVars: []string{"STORAGE_FRONTEND_DATAGATEWAY_PREFIX"},
Destination: &cfg.Reva.Frontend.DatagatewayPrefix, 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{ &cli.StringFlag{
Name: "ocdav-prefix", Name: "ocdav-prefix",
Value: flags.OverrideDefaultString(cfg.Reva.Frontend.OCDavPrefix, ""), Value: flags.OverrideDefaultString(cfg.Reva.Frontend.OCDavPrefix, ""),