From 0ab490845aed0ce3b58cbffd8ec35be237abda1c Mon Sep 17 00:00:00 2001 From: Corey Hulen Date: Wed, 16 Aug 2017 09:51:45 -0700 Subject: PLT-6226 Fixing races with licensing (#7213) * PLT-6226 Fixing races with licensing * Fixing build issue * Fixing licensing issue * removing commented code --- api4/context.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'api4/context.go') diff --git a/api4/context.go b/api4/context.go index d72b3593d..69351a098 100644 --- a/api4/context.go +++ b/api4/context.go @@ -129,7 +129,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, utils.ClientCfgHash, utils.IsLicensed())) w.Header().Set("Content-Type", "application/json") @@ -252,7 +252,7 @@ func (c *Context) SessionRequired() { func (c *Context) MfaRequired() { // Must be licensed for MFA and have it configured for enforcement - if !utils.IsLicensed || !*utils.License.Features.MFA || !*utils.Cfg.ServiceSettings.EnableMultifactorAuthentication || !*utils.Cfg.ServiceSettings.EnforceMultifactorAuthentication { + if !utils.IsLicensed() || !*utils.License().Features.MFA || !*utils.Cfg.ServiceSettings.EnableMultifactorAuthentication || !*utils.Cfg.ServiceSettings.EnforceMultifactorAuthentication { return } -- cgit v1.2.3-1-g7c22