mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Add postgres support, clean code, code review
This commit is contained in:
		@@ -8,6 +8,7 @@ import (
 | 
			
		||||
	"github.com/codegangsta/martini"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// SignInRequire requires user to sign in.
 | 
			
		||||
func SignInRequire(redirect bool) martini.Handler {
 | 
			
		||||
	return func(ctx *Context) {
 | 
			
		||||
		if !ctx.IsSigned {
 | 
			
		||||
@@ -19,6 +20,7 @@ func SignInRequire(redirect bool) martini.Handler {
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// SignOutRequire requires user to sign out.
 | 
			
		||||
func SignOutRequire() martini.Handler {
 | 
			
		||||
	return func(ctx *Context) {
 | 
			
		||||
		if ctx.IsSigned {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user