mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-11 16:34:28 +00:00
Revert "send 401 when login fails"
This reverts commit fb901c6365d37654ba9058f57a71a4e60366688e.
This commit is contained in:
parent
7976f2f0fe
commit
66ba6e612d
2 changed files with 5 additions and 4 deletions
|
@ -32,7 +32,7 @@ module.exports = AuthenticationController =
|
|||
else
|
||||
AuthenticationController._recordFailedLogin()
|
||||
logger.log email: email, "failed log in"
|
||||
res.send 401, message:
|
||||
res.send message:
|
||||
text: req.i18n.translate("email_or_password_wrong_try_again"),
|
||||
type: 'error'
|
||||
|
||||
|
|
|
@ -96,10 +96,11 @@ describe "AuthenticationController", ->
|
|||
@AuthenticationController.login(@req, @res)
|
||||
|
||||
it "should return an error", ->
|
||||
# @res.body.should.exist
|
||||
expect(@res.body.message).to.exist
|
||||
|
||||
it "should set the res code to 401", ->
|
||||
@res.statusCode.should.equal 401
|
||||
# message:
|
||||
# text: 'Your email or password were incorrect. Please try again',
|
||||
# type: 'error'
|
||||
|
||||
it "should not establish a session", ->
|
||||
@AuthenticationController._establishUserSession.called.should.equal false
|
||||
|
|
Loading…
Reference in a new issue