diff options
author | Chris <ccbrown112@gmail.com> | 2018-02-06 17:25:49 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-06 17:25:49 -0600 |
commit | 1ec295f88ca99e9423ffd91019cecf802ae3dc77 (patch) | |
tree | 05abc364fefdc6b1088bfb4a307ba11db0dc427f /app/oauth.go | |
parent | 034dbc07e3068c482e654b6a1a8fcbe4b01c44f3 (diff) | |
download | chat-1ec295f88ca99e9423ffd91019cecf802ae3dc77.tar.gz chat-1ec295f88ca99e9423ffd91019cecf802ae3dc77.tar.bz2 chat-1ec295f88ca99e9423ffd91019cecf802ae3dc77.zip |
add App.License, remove utils.IsLicensed / utils.License calls (#8203)
Diffstat (limited to 'app/oauth.go')
-rw-r--r-- | app/oauth.go | 4 |
1 files changed, 2 insertions, 2 deletions
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) } |