MCPcopy Create free account
hub / github.com/gogs/gogs / RequireRepoAdmin

Function RequireRepoAdmin

internal/context/repo.go:435–442  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

433}
434
435func RequireRepoAdmin() macaron.Handler {
436 return func(c *Context) {
437 if !c.IsLogged || (!c.Repo.IsAdmin() && !c.User.IsAdmin) {
438 c.NotFound()
439 return
440 }
441 }
442}
443
444func RequireRepoWriter() macaron.Handler {
445 return func(c *Context) {

Callers 1

runWebFunction · 0.92

Calls 2

IsAdminMethod · 0.80
NotFoundMethod · 0.65

Tested by

no test coverage detected