From 91d430b2a39a03b052cc103f73f44c68cbc96b2d Mon Sep 17 00:00:00 2001 From: George Goldberg Date: Wed, 15 Mar 2017 19:32:02 +0000 Subject: Fix policy application in team edition. (#5771) --- app/license.go | 4 ++++ app/web_conn.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'app') diff --git a/app/license.go b/app/license.go index 87b2d1b05..1efaf85d5 100644 --- a/app/license.go +++ b/app/license.go @@ -76,6 +76,8 @@ func SaveLicense(licenseBytes []byte) (*model.License, *model.AppError) { return nil, model.NewLocAppError("addLicense", model.INVALID_LICENSE_ERROR, nil, "") } + ReloadConfig() + InvalidateAllCaches() return license, nil @@ -93,6 +95,8 @@ func RemoveLicense() *model.AppError { return result.Err } + ReloadConfig() + InvalidateAllCaches() return nil diff --git a/app/web_conn.go b/app/web_conn.go index 012236513..da6330f5c 100644 --- a/app/web_conn.go +++ b/app/web_conn.go @@ -178,7 +178,7 @@ func (webCon *WebConn) IsAuthenticated() bool { func (webCon *WebConn) SendHello() { msg := model.NewWebSocketEvent(model.WEBSOCKET_EVENT_HELLO, "", "", webCon.UserId, nil) - msg.Add("server_version", fmt.Sprintf("%v.%v.%v", model.CurrentVersion, model.BuildNumber, utils.CfgHash)) + msg.Add("server_version", fmt.Sprintf("%v.%v.%v.%v", model.CurrentVersion, model.BuildNumber, utils.CfgHash, utils.IsLicensed)) msg.DoPreComputeJson() webCon.Send <- msg } -- cgit v1.2.3-1-g7c22