Browse Source

增加打印信息

Signed-off-by: zouap <zouap@pcl.ac.cn>
pull/3499/head
zouap 2 years ago
parent
commit
8738240554
2 changed files with 2 additions and 0 deletions
  1. +1
    -0
      modules/context/auth.go
  2. +1
    -0
      modules/context/context.go

+ 1
- 0
modules/context/auth.go View File

@@ -81,6 +81,7 @@ func Toggle(options *ToggleOptions) macaron.Handler {

// Redirect to dashboard if user tries to visit any non-login page.
if options.SignOutRequired && ctx.IsSigned && ctx.Req.URL.RequestURI() != "/" {
log.Info("YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY")
ctx.Redirect(setting.AppSubURL + "/")
return
}


+ 1
- 0
modules/context/context.go View File

@@ -308,6 +308,7 @@ func Contexter() macaron.Handler {

if ctx.User != nil {
ctx.IsSigned = true
log.Info("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
ctx.Data["IsSigned"] = ctx.IsSigned
ctx.Data["SignedUser"] = ctx.User
ctx.Data["SignedUserID"] = ctx.User.ID


Loading…
Cancel
Save