Merge branch '21815-trigrams-exclude-ids'
[arvados.git] / lib / config / deprecated.go
index 0db3de7fc99d987cce1cf43dd5a982c590653272..b567cdbaa5c3cf808e5d0e399f3169f2d3648fe5 100644 (file)
@@ -31,6 +31,10 @@ type deprCluster struct {
                ProviderAppID                 *string
                ProviderAppSecret             *string
        }
+       Mail struct {
+               SendUserSetupNotificationEmail *bool
+               SupportEmailAddress            *string
+       }
 }
 
 type deprecatedConfig struct {
@@ -87,6 +91,14 @@ func (ldr *Loader) applyDeprecatedConfig(cfg *arvados.Config) error {
                if dst, n := &cluster.API.MaxRequestAmplification, dcluster.RequestLimits.MultiClusterRequestConcurrency; n != nil && *n != *dst {
                        *dst = *n
                }
+               if dst, addr := &cluster.Users.SupportEmailAddress, dcluster.Mail.SupportEmailAddress; addr != nil {
+                       *dst = *addr
+                       ldr.Logger.Warnf("using your old config key Mail.SupportEmailAddress -- but you should rename it to Users.SupportEmailAddress")
+               }
+               if dst, b := &cluster.Users.SendUserSetupNotificationEmail, dcluster.Mail.SendUserSetupNotificationEmail; b != nil {
+                       *dst = *b
+                       ldr.Logger.Warnf("using your old config key Mail.SendUserSetupNotificationEmail -- but you should rename it to Users.SendUserSetupNotificationEmail")
+               }
 
                // Google* moved to Google.*
                if dst, n := &cluster.Login.Google.ClientID, dcluster.Login.GoogleClientID; n != nil && *n != *dst {