Remove utils.ClientCfg and utils.ClientCfgHash (#8041)
* remove utils.ClientCfg and utils.ClientCfgHash * remove unused import
Этот коммит содержится в:
@@ -151,7 +151,7 @@ func (h handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
c.SetSiteURLHeader(app.GetProtocol(r) + "://" + r.Host)
|
||||
|
||||
w.Header().Set(model.HEADER_REQUEST_ID, c.RequestId)
|
||||
w.Header().Set(model.HEADER_VERSION_ID, fmt.Sprintf("%v.%v.%v.%v", model.CurrentVersion, model.BuildNumber, utils.ClientCfgHash, utils.IsLicensed()))
|
||||
w.Header().Set(model.HEADER_VERSION_ID, fmt.Sprintf("%v.%v.%v.%v", model.CurrentVersion, model.BuildNumber, c.App.ClientConfigHash(), utils.IsLicensed()))
|
||||
|
||||
// Instruct the browser not to display us in an iframe unless is the same origin for anti-clickjacking
|
||||
if !h.isApi {
|
||||
|
||||
@@ -9,7 +9,6 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
"github.com/mattermost/mattermost-server/utils"
|
||||
)
|
||||
|
||||
func (api *API) InitGeneral() {
|
||||
@@ -19,7 +18,7 @@ func (api *API) InitGeneral() {
|
||||
}
|
||||
|
||||
func getClientConfig(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
w.Write([]byte(model.MapToJson(utils.ClientCfg)))
|
||||
w.Write([]byte(model.MapToJson(c.App.ClientConfig())))
|
||||
}
|
||||
|
||||
func logClient(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
@@ -297,7 +297,7 @@ func getInitialLoad(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
il.NoAccounts = c.App.IsFirstUserAccount()
|
||||
}
|
||||
|
||||
il.ClientCfg = utils.ClientCfg
|
||||
il.ClientCfg = c.App.ClientConfig()
|
||||
if c.App.SessionHasPermissionTo(c.Session, model.PERMISSION_MANAGE_SYSTEM) {
|
||||
il.LicenseCfg = utils.ClientLicense()
|
||||
} else {
|
||||
|
||||
Ссылка в новой задаче
Block a user