artificial user recovery access control
This commit is contained in:
parent
c9030cb985
commit
310da797c3
|
@ -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
2
todo
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue