From 5a60ea0d756531fef4e6e94be1377c10a7022260 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Thu, 27 Apr 2017 10:57:58 -0400 Subject: PLT-6268 Clear blue bar correctly when removing expiring license (#6247) * Don't sanitize license for system admin * Clear blue bar error whe removing expiring license * Fix unit test --- api4/system.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'api4/system.go') diff --git a/api4/system.go b/api4/system.go index 7e860ba76..1f4589bf5 100644 --- a/api4/system.go +++ b/api4/system.go @@ -231,6 +231,14 @@ func getClientLicense(c *Context, w http.ResponseWriter, r *http.Request) { return } + var clientLicense map[string]string + + if app.SessionHasPermissionTo(c.Session, model.PERMISSION_MANAGE_SYSTEM) { + clientLicense = utils.ClientLicense + } else { + clientLicense = utils.GetSanitizedClientLicense() + } + w.Header().Set(model.HEADER_ETAG_SERVER, etag) - w.Write([]byte(model.MapToJson(utils.GetSanitizedClientLicense()))) + w.Write([]byte(model.MapToJson(clientLicense))) } -- cgit v1.2.3-1-g7c22