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/oauth.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/oauth.go') diff --git a/app/oauth.go b/app/oauth.go index 1cce5a3a0..5a66f542e 100644 --- a/app/oauth.go +++ b/app/oauth.go @@ -717,7 +717,7 @@ func (a *App) AuthorizeOAuthUser(w http.ResponseWriter, r *http.Request, service } func (a *App) SwitchEmailToOAuth(w http.ResponseWriter, r *http.Request, email, password, code, service string) (string, *model.AppError) { - if utils.IsLicensed() && !*a.Config().ServiceSettings.ExperimentalEnableAuthenticationTransfer { + if a.License() != nil && !*a.Config().ServiceSettings.ExperimentalEnableAuthenticationTransfer { return "", model.NewAppError("emailToOAuth", "api.user.email_to_oauth.not_available.app_error", nil, "", http.StatusForbidden) } @@ -747,7 +747,7 @@ func (a *App) SwitchEmailToOAuth(w http.ResponseWriter, r *http.Request, email, } func (a *App) SwitchOAuthToEmail(email, password, requesterId string) (string, *model.AppError) { - if utils.IsLicensed() && !*a.Config().ServiceSettings.ExperimentalEnableAuthenticationTransfer { + if a.License() != nil && !*a.Config().ServiceSettings.ExperimentalEnableAuthenticationTransfer { return "", model.NewAppError("oauthToEmail", "api.user.oauth_to_email.not_available.app_error", nil, "", http.StatusForbidden) } -- cgit v1.2.3-1-g7c22