mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	minor fix on auto sign in
This commit is contained in:
		@@ -110,13 +110,13 @@ func Toggle(options *ToggleOptions) macaron.Handler {
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		// Try auto-signin when not signed in.
 | 
			
		||||
		if !ctx.IsSigned {
 | 
			
		||||
		if !options.SignOutRequire && !ctx.IsSigned && !auth.IsAPIPath(ctx.Req.URL.Path) {
 | 
			
		||||
			succeed, err := AutoSignIn(ctx)
 | 
			
		||||
			if err != nil {
 | 
			
		||||
				ctx.Handle(500, "AutoSignIn", err)
 | 
			
		||||
				return
 | 
			
		||||
			} else if succeed {
 | 
			
		||||
				ctx.Redirect(ctx.Req.URL.Path)
 | 
			
		||||
				ctx.Redirect(setting.AppSubUrl + ctx.Req.RequestURI)
 | 
			
		||||
				return
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user