Remove license globals entirely (#8229)
* remove license globals entirely * fix infinite recursion * test fix
Этот коммит содержится в:
@@ -266,7 +266,7 @@ func getClientLicense(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
etag := utils.GetClientLicenseEtag(true)
|
||||
etag := c.App.GetClientLicenseEtag(true)
|
||||
if c.HandleEtag(etag, "Get Client License", w, r) {
|
||||
return
|
||||
}
|
||||
@@ -274,9 +274,9 @@ func getClientLicense(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
var clientLicense map[string]string
|
||||
|
||||
if c.App.SessionHasPermissionTo(c.Session, model.PERMISSION_MANAGE_SYSTEM) {
|
||||
clientLicense = utils.ClientLicense()
|
||||
clientLicense = c.App.ClientLicense()
|
||||
} else {
|
||||
clientLicense = utils.GetSanitizedClientLicense()
|
||||
clientLicense = c.App.GetSanitizedClientLicense()
|
||||
}
|
||||
|
||||
w.Header().Set(model.HEADER_ETAG_SERVER, etag)
|
||||
|
||||
Ссылка в новой задаче
Block a user