From 3d654683da1e9352459ff3f261c12e0831fcf438 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pablo=20Villaf=C3=A1=C3=B1ez?= Date: Wed, 6 Nov 2024 14:32:32 +0100 Subject: [PATCH] fix: copy app name if product name isn't provided --- .../collaboration/pkg/config/defaults/defaultconfig.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/services/collaboration/pkg/config/defaults/defaultconfig.go b/services/collaboration/pkg/config/defaults/defaultconfig.go index 1b22b43480..def74b8627 100644 --- a/services/collaboration/pkg/config/defaults/defaultconfig.go +++ b/services/collaboration/pkg/config/defaults/defaultconfig.go @@ -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", @@ -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