Skip to content

Commit

Permalink
Merge pull request #10490 from owncloud/collaboration_config_upgrade_…
Browse files Browse the repository at this point in the history
…6to7

fix: copy app name if product name isn't provided
  • Loading branch information
micbar authored Nov 6, 2024
2 parents 2fa5a4d + 86dd3e7 commit 093e6f0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog/unreleased/collaboration-product-name.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ The product name will allow using a different app name.
For example, a "CoolBox" app name might use a branded Collabora instance by using "Collabora" as product name.

https://github.com/owncloud/ocis/pull/10335
https://github.com/owncloud/ocis/pull/10490
9 changes: 8 additions & 1 deletion services/collaboration/pkg/config/defaults/defaultconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ func DefaultConfig() *config.Config {
},
App: config.App{
Name: "Collabora",
Product: "Collabora",
Description: "Open office documents with Collabora",
Icon: "image-edit",
Addr: "https://127.0.0.1:9980",
Expand Down Expand Up @@ -106,6 +105,14 @@ func EnsureDefaults(cfg *config.Config) {
if cfg.CS3Api.GRPCClientTLS == nil && cfg.Commons != nil {
cfg.CS3Api.GRPCClientTLS = structs.CopyOrZeroValue(cfg.Commons.GRPCClientTLS)
}

// Copy the app name into the product name if empty.
// This is for the upgrade from OCIS 6 to 7 where we didn't have product
// name and the app name was acting as such. From OCIS 7, the product name
// should be set manually in the configuration.
if cfg.App.Product == "" {
cfg.App.Product = cfg.App.Name
}
}

// Sanitize sanitized the configuration
Expand Down

0 comments on commit 093e6f0

Please sign in to comment.