* Fixing sanitize license

* Fixing license

* Fixing unit tests
Этот коммит содержится в:
Corey Hulen
2016-08-25 04:32:44 -08:00
коммит произвёл Harrison Healey
родитель c3ae3f20f5
Коммит 839f1ad444
4 изменённых файлов: 21 добавлений и 9 удалений

Просмотреть файл

@@ -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)))

Просмотреть файл

@@ -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()))