artificial user recovery access control

This commit is contained in:
Thibault Duplessis 2013-12-22 22:07:02 +01:00
parent c9030cb985
commit 310da797c3
2 changed files with 13 additions and 10 deletions

View file

@ -72,15 +72,18 @@ object Auth extends LilaController {
def newPassword = AuthBody { implicit ctx
me
implicit val req = ctx.body
forms.newPassword.bindFromRequest.fold(
err fuccess {
BadRequest(html.auth.artificialPassword(me, err))
},
pass UserRepo.artificialSetPassword(me.id, pass) map { _
Redirect(routes.Lobby.home)
}
)
if (!me.artificial) fuccess(Redirect(routes.Lobby.home))
else {
implicit val req = ctx.body
forms.newPassword.bindFromRequest.fold(
err fuccess {
BadRequest(html.auth.artificialPassword(me, err))
},
pass UserRepo.artificialSetPassword(me.id, pass) map { _
Redirect(routes.Lobby.home)
}
)
}
}
private def gotoLogoutSucceeded(implicit req: RequestHeader) = {

2
todo
View file

@ -102,9 +102,9 @@ wrong analysis = move 9 should be a blunder http://en.lichess.org/analyse/pf3ruf
check "continue from position" #lichess
from position + clock = fail (due to turns != played turns)
streamed export of PGN http://en.lichess.org/forum/lichess-feedback/download-all-games#5
fix clipping in lobby chart
visual sep under standard/chess960 ratings
progress over date ranges
lobby filter is broken
--- deploy