mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-11-04 08:21:11 +00:00 
			
		
		
		
	Backport #25955 by @wxiaoguang
Try to fix #25952
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
(cherry picked from commit 227c3b67e0)
	
	
This commit is contained in:
		
					parent
					
						
							
								8630d63f57
							
						
					
				
			
			
				commit
				
					
						0593018dba
					
				
			
		
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -97,9 +97,9 @@ func (s *SSPI) Verify(req *http.Request, w http.ResponseWriter, store DataStore,
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		store.GetData()["EnableOpenIDSignIn"] = setting.Service.EnableOpenIDSignIn
 | 
							store.GetData()["EnableOpenIDSignIn"] = setting.Service.EnableOpenIDSignIn
 | 
				
			||||||
		store.GetData()["EnableSSPI"] = true
 | 
							store.GetData()["EnableSSPI"] = true
 | 
				
			||||||
		// in this case, the store is Gitea's web Context
 | 
							// in this case, the Verify function is called in Gitea's web context
 | 
				
			||||||
		// FIXME: it doesn't look good to render the page here, why not redirect?
 | 
							// FIXME: it doesn't look good to render the page here, why not redirect?
 | 
				
			||||||
		store.(*gitea_context.Context).HTML(http.StatusUnauthorized, tplSignIn)
 | 
							gitea_context.GetWebContext(req).HTML(http.StatusUnauthorized, tplSignIn)
 | 
				
			||||||
		return nil, err
 | 
							return nil, err
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if outToken != "" {
 | 
						if outToken != "" {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue