Browse Source

Admin URL now redirect to home page and Resolves #46

Yoginth 7 years ago
parent
commit
59bcb550b1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      pkg/context/auth.go

+ 1 - 1
pkg/context/auth.go

@@ -84,7 +84,7 @@ func Toggle(options *ToggleOptions) macaron.Handler {
 
 		if options.AdminRequired {
 			if !c.User.IsAdmin {
-				c.Error(403)
+				c.Redirect(setting.AppSubURL + "/")
 				return
 			}
 			c.Data["PageIsAdmin"] = true