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
Этот коммит содержится в:
коммит произвёл
Corey Hulen
родитель
9a87bb3af6
Коммит
5a60ea0d75
@@ -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)))
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user