mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-12-19 19:57:09 +08:00
1、增加了登录后重定向至原始请求 URL 的功能;2、格式化了相关文件中的代码。
This commit is contained in:
@@ -99,6 +99,11 @@ func isUserLoggedIn(c *DocumentController) bool {
|
||||
}
|
||||
|
||||
func promptUserToLogIn(c *DocumentController) {
|
||||
beego.Info("Access " + c.Ctx.Request.URL.RequestURI() + " not permitted.")
|
||||
beego.Info(" Access will be redirected to login page(SessionId: " + c.CruSession.SessionID() + ").")
|
||||
|
||||
c.SetSession("turl", c.Ctx.Request.URL.RequestURI())
|
||||
|
||||
if c.IsAjax() {
|
||||
c.JsonResult(6000, "需要[重]登录。")
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user