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

Function RequireRepoWriter

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

Source from the content-addressed store, hash-verified

442}
443
444func RequireRepoWriter() macaron.Handler {
445 return func(c *Context) {
446 if !c.IsLogged || (!c.Repo.IsWriter() && !c.User.IsAdmin) {
447 c.NotFound()
448 return
449 }
450 }
451}
452
453// GitHookService checks if repository Git hooks service has been enabled.
454func GitHookService() macaron.Handler {

Callers 1

runWebFunction · 0.92

Calls 2

IsWriterMethod · 0.80
NotFoundMethod · 0.65

Tested by

no test coverage detected