diff options
author | Josta Yee <jostyee@users.noreply.github.com> | 2017-02-17 22:04:19 +0800 |
---|---|---|
committer | George Goldberg <george@gberg.me> | 2017-02-17 14:04:19 +0000 |
commit | c817c5d7405f2dcc63e95e557f3ac64c268fadeb (patch) | |
tree | 96bd12604571412f020a01eb8ecc6228a57c1ffe /app/authentication.go | |
parent | b3afe9fb16523415f3bceafde9bb80b4d229e2b2 (diff) | |
download | chat-c817c5d7405f2dcc63e95e557f3ac64c268fadeb.tar.gz chat-c817c5d7405f2dcc63e95e557f3ac64c268fadeb.tar.bz2 chat-c817c5d7405f2dcc63e95e557f3ac64c268fadeb.zip |
Simplify code (#5452)
https://github.com/mattermost/platform/blob/master/app/authentication.go#L149 has compared `user.AuthService` with `model.USER_AUTH_SERVICE_LDAP`, so this check is useless here.
Diffstat (limited to 'app/authentication.go')
-rw-r--r-- | app/authentication.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/authentication.go b/app/authentication.go index 3691c7c3e..369458527 100644 --- a/app/authentication.go +++ b/app/authentication.go @@ -160,7 +160,7 @@ func authenticateUser(user *model.User, password, mfaToken string) (*model.User, } } else if user.AuthService != "" { authService := user.AuthService - if authService == model.USER_AUTH_SERVICE_SAML || authService == model.USER_AUTH_SERVICE_LDAP { + if authService == model.USER_AUTH_SERVICE_SAML { authService = strings.ToUpper(authService) } err := model.NewLocAppError("login", "api.user.login.use_auth_service.app_error", map[string]interface{}{"AuthService": authService}, "") |