mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-06 05:25:50 +01:00
Fix redirect path after sign in.
This commit is contained in:
@@ -58,9 +58,6 @@ trait AccountControllerBase extends AccountManagementControllerBase with FlashMa
|
||||
getAccountByUserName(userName).flatMap(_.image).map { image =>
|
||||
contentType = FileUtil.getMimeType(image)
|
||||
new java.io.File(getUserUploadDir(userName), image)
|
||||
// } getOrElse {
|
||||
// contentType = "image/png"
|
||||
// Thread.currentThread.getContextClassLoader.getResourceAsStream("noimage.png")
|
||||
} getOrElse NotFound
|
||||
}
|
||||
|
||||
@@ -86,7 +83,11 @@ trait AccountControllerBase extends AccountManagementControllerBase with FlashMa
|
||||
|
||||
get("/register"){
|
||||
if(loadSystemSettings().allowAccountRegistration){
|
||||
account.html.edit(None, None)
|
||||
if(context.loginAccount.isDefined){
|
||||
redirect("/")
|
||||
} else {
|
||||
account.html.edit(None, None)
|
||||
}
|
||||
} else NotFound
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ trait SignInControllerBase extends ControllerBase { self: SystemSettingsService
|
||||
session.removeAttribute("REDIRECT")
|
||||
redirect(redirectUrl.asInstanceOf[String])
|
||||
}.getOrElse {
|
||||
redirect("/%s".format(account.get.userName))
|
||||
redirect("/")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user