From c817c5d7405f2dcc63e95e557f3ac64c268fadeb Mon Sep 17 00:00:00 2001 From: Josta Yee Date: Fri, 17 Feb 2017 22:04:19 +0800 Subject: 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. --- app/authentication.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/authentication.go') 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}, "") -- cgit v1.2.3-1-g7c22