add App.License, remove utils.IsLicensed / utils.License calls (#8203)

Этот коммит содержится в:
Chris
2018-02-06 17:25:49 -06:00
коммит произвёл GitHub
родитель 034dbc07e3
Коммит 1ec295f88c
21 изменённых файлов: 56 добавлений и 48 удалений

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

@@ -1057,7 +1057,7 @@ func updateMfa(c *Context, w http.ResponseWriter, r *http.Request) {
}
func checkMfa(c *Context, w http.ResponseWriter, r *http.Request) {
if !utils.IsLicensed() || !*utils.License().Features.MFA || !*c.App.Config().ServiceSettings.EnableMultifactorAuthentication {
if license := c.App.License(); license == nil || !*license.Features.MFA || !*c.App.Config().ServiceSettings.EnableMultifactorAuthentication {
rdata := map[string]string{}
rdata["mfa_required"] = "false"
w.Write([]byte(model.MapToJson(rdata)))