forked from forgejo/forgejo
Work on admin
This commit is contained in:
parent
9f9cd6bfc6
commit
4cf6cc63b0
6 changed files with 10 additions and 14 deletions
|
@ -39,7 +39,7 @@ func SignOutRequire() martini.Handler {
|
|||
// AdminRequire requires user signed in as administor.
|
||||
func AdminRequire() martini.Handler {
|
||||
return func(ctx *Context) {
|
||||
if ctx.User.LowerName != base.AdminName && !ctx.User.IsAdmin {
|
||||
if !ctx.User.IsAdmin {
|
||||
ctx.Error(403)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue