Skip to content

Commit

Permalink
Add favorites capability
Browse files Browse the repository at this point in the history
  • Loading branch information
kulmann committed Oct 8, 2021
1 parent 5f0cf07 commit 489d0a5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions changelog/unreleased/favorites-capability.md
Original file line number Diff line number Diff line change
@@ -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 change: 1 addition & 0 deletions storage/pkg/command/frontend.go
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down
1 change: 1 addition & 0 deletions storage/pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ type FrontendPort struct {
AppProviderPrefix string
ArchiverPrefix string
DatagatewayPrefix string
Favorites bool
OCDavPrefix string
OCSPrefix string
OCSSharePrefix string
Expand Down
7 changes: 7 additions & 0 deletions storage/pkg/flagset/frontend.go
Original file line number Diff line number Diff line change
Expand Up @@ -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, ""),
Expand Down

0 comments on commit 489d0a5

Please sign in to comment.