diff options
author | Corey Hulen <corey@hulen.com> | 2016-08-25 04:32:44 -0800 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2016-08-25 08:32:44 -0400 |
commit | 839f1ad444849db1dd18c9da0c3b7380b355a047 (patch) | |
tree | 5344f29c42a5db0af983402fa8bd47483992ead2 /api/license.go | |
parent | c3ae3f20f58b25aa6aba480ddc2239fd09e610cb (diff) | |
download | chat-839f1ad444849db1dd18c9da0c3b7380b355a047.tar.gz chat-839f1ad444849db1dd18c9da0c3b7380b355a047.tar.bz2 chat-839f1ad444849db1dd18c9da0c3b7380b355a047.zip |
Fixing license (#3878)
* Fixing sanitize license
* Fixing license
* Fixing unit tests
Diffstat (limited to 'api/license.go')
-rw-r--r-- | api/license.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/api/license.go b/api/license.go index f9ecce486..b7bf8a234 100644 --- a/api/license.go +++ b/api/license.go @@ -173,12 +173,18 @@ func RemoveLicense() *model.AppError { } func getClientLicenceConfig(c *Context, w http.ResponseWriter, r *http.Request) { - etag := utils.GetClientLicenseEtag() + etag := utils.GetClientLicenseEtag(!c.IsSystemAdmin()) if HandleEtag(etag, w, r) { return } - clientLicense := utils.ClientLicense + var clientLicense map[string]string + + if c.IsSystemAdmin() { + clientLicense = utils.ClientLicense + } else { + clientLicense = utils.GetSanitizedClientLicense() + } w.Header().Set(model.HEADER_ETAG_SERVER, etag) w.Write([]byte(model.MapToJson(clientLicense))) |