summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
Diffstat (limited to 'api')
-rw-r--r--api/license.go10
-rw-r--r--api/user.go2
2 files changed, 9 insertions, 3 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)))
diff --git a/api/user.go b/api/user.go
index d7eab3d46..b0d2c79b4 100644
--- a/api/user.go
+++ b/api/user.go
@@ -922,7 +922,7 @@ func getInitialLoad(c *Context, w http.ResponseWriter, r *http.Request) {
if c.IsSystemAdmin() {
il.LicenseCfg = utils.ClientLicense
} else {
- il.LicenseCfg = utils.GetSantizedClientLicense()
+ il.LicenseCfg = utils.GetSanitizedClientLicense()
}
w.Write([]byte(il.ToJson()))