use common config for jsoncs3 defaults

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
Jörn Friedrich Dreyer
2022-08-26 12:19:44 +00:00
parent 26476dc640
commit bba00e11a9

View File

@@ -119,6 +119,14 @@ func EnsureDefaults(cfg *config.Config) {
cfg.UserSharingDrivers.CS3.SystemUserID = cfg.Commons.SystemUserID
}
if cfg.UserSharingDrivers.JSONCS3.SystemUserAPIKey == "" && cfg.Commons != nil && cfg.Commons.SystemUserAPIKey != "" {
cfg.UserSharingDrivers.JSONCS3.SystemUserAPIKey = cfg.Commons.SystemUserAPIKey
}
if cfg.UserSharingDrivers.JSONCS3.SystemUserID == "" && cfg.Commons != nil && cfg.Commons.SystemUserID != "" {
cfg.UserSharingDrivers.JSONCS3.SystemUserID = cfg.Commons.SystemUserID
}
if cfg.PublicSharingDrivers.CS3.SystemUserAPIKey == "" && cfg.Commons != nil && cfg.Commons.SystemUserAPIKey != "" {
cfg.PublicSharingDrivers.CS3.SystemUserAPIKey = cfg.Commons.SystemUserAPIKey
}