diff options
author | Gogs <gogitservice@gmail.com> | 2015-02-27 12:42:03 +0000 |
---|---|---|
committer | Gogs <gogitservice@gmail.com> | 2015-02-27 13:18:29 +0000 |
commit | fab038b1752de59503c1ce3d8aea01b965a03db5 (patch) | |
tree | d7ac7f99a8544610e6d95ff83ea5f774836b7707 /routers/repo/http.go | |
parent | d85366930c94145c8f1119ff0b6bb95d77c5200e (diff) | |
download | gitea-fab038b1752de59503c1ce3d8aea01b965a03db5.tar.gz gitea-fab038b1752de59503c1ce3d8aea01b965a03db5.zip |
Attempt #3 of ldap fixes
Diffstat (limited to 'routers/repo/http.go')
-rw-r--r-- | routers/repo/http.go | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/routers/repo/http.go b/routers/repo/http.go index f5dc0c9d6a..35338fefbe 100644 --- a/routers/repo/http.go +++ b/routers/repo/http.go @@ -105,10 +105,10 @@ func Http(ctx *middleware.Context) { return } - authUser, err = models.GetUserByName(authUsername) + authUser, err := models.UserSignIn(authUsername, authPasswd) if err != nil { if err != models.ErrUserNotExist { - ctx.Handle(500, "GetUserByName", err) + ctx.Handle(500, "UserSignIn error: %v", err) return } @@ -128,12 +128,6 @@ func Http(ctx *middleware.Context) { return } authUsername = authUser.Name - } else { - // Check user's password when username is correctly presented. - if !authUser.ValidtePassword(authPasswd) { - ctx.Handle(401, "invalid password", nil) - return - } } if !isPublicPull { |