Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add favorites capability #2599

Merged
merged 1 commit into from
Oct 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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