From 1ec295f88ca99e9423ffd91019cecf802ae3dc77 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 6 Feb 2018 17:25:49 -0600 Subject: add App.License, remove utils.IsLicensed / utils.License calls (#8203) --- app/session.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/session.go') diff --git a/app/session.go b/app/session.go index 1c5daf29e..459618439 100644 --- a/app/session.go +++ b/app/session.go @@ -69,8 +69,9 @@ func (a *App) GetSession(token string) (*model.Session, *model.AppError) { return nil, model.NewAppError("GetSession", "api.context.invalid_token.error", map[string]interface{}{"Token": token}, "", http.StatusUnauthorized) } + license := a.License() if *a.Config().ServiceSettings.SessionIdleTimeoutInMinutes > 0 && - utils.IsLicensed() && *utils.License().Features.Compliance && + license != nil && *license.Features.Compliance && session != nil && !session.IsOAuth && !session.IsMobileApp() && session.Props[model.SESSION_PROP_TYPE] != model.SESSION_TYPE_USER_ACCESS_TOKEN { -- cgit v1.2.3-1-g7c22