summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/config.go4
-rw-r--r--utils/license.go1
-rw-r--r--utils/mail.go7
3 files changed, 7 insertions, 5 deletions
diff --git a/utils/config.go b/utils/config.go
index 0f5d69a13..7889ea9ac 100644
--- a/utils/config.go
+++ b/utils/config.go
@@ -329,6 +329,10 @@ func getClientConfig(c *model.Config) map[string]string {
props["EnableCluster"] = strconv.FormatBool(*c.ClusterSettings.Enable)
}
+ if *License.Features.Cluster {
+ props["EnableMetrics"] = strconv.FormatBool(*c.MetricsSettings.Enable)
+ }
+
if *License.Features.GoogleOAuth {
props["EnableSignUpWithGoogle"] = strconv.FormatBool(c.GoogleSettings.Enable)
}
diff --git a/utils/license.go b/utils/license.go
index 4d6387788..456a731a1 100644
--- a/utils/license.go
+++ b/utils/license.go
@@ -123,6 +123,7 @@ func getClientLicense(l *model.License) map[string]string {
props["MFA"] = strconv.FormatBool(*l.Features.MFA)
props["SAML"] = strconv.FormatBool(*l.Features.SAML)
props["Cluster"] = strconv.FormatBool(*l.Features.Cluster)
+ props["Metrics"] = strconv.FormatBool(*l.Features.Metrics)
props["GoogleOAuth"] = strconv.FormatBool(*l.Features.GoogleOAuth)
props["Office365OAuth"] = strconv.FormatBool(*l.Features.Office365OAuth)
props["Compliance"] = strconv.FormatBool(*l.Features.Compliance)
diff --git a/utils/mail.go b/utils/mail.go
index bb3ee7b17..6a348e52e 100644
--- a/utils/mail.go
+++ b/utils/mail.go
@@ -5,10 +5,10 @@ package utils
import (
"crypto/tls"
- "encoding/base64"
"fmt"
l4g "github.com/alecthomas/log4go"
"github.com/mattermost/platform/model"
+ "mime"
"net"
"net/mail"
"net/smtp"
@@ -16,10 +16,7 @@ import (
)
func encodeRFC2047Word(s string) string {
- // TODO: use `mime.BEncoding.Encode` instead when `go` >= 1.5
- // return mime.BEncoding.Encode("utf-8", s)
- dst := base64.StdEncoding.EncodeToString([]byte(s))
- return "=?utf-8?b?" + dst + "?="
+ return mime.BEncoding.Encode("utf-8", s)
}
func connectToSMTPServer(config *model.Config) (net.Conn, *model.AppError) {