diff options
Diffstat (limited to 'routers/web/repo/http.go')
-rw-r--r-- | routers/web/repo/http.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/routers/web/repo/http.go b/routers/web/repo/http.go index 3390f026a0..7947776f16 100644 --- a/routers/web/repo/http.go +++ b/routers/web/repo/http.go @@ -198,6 +198,11 @@ func httpBase(ctx *context.Context) (h *serviceHandler) { return } + // Because of special ref "refs/for" .. , need delay write permission check + if git.SupportProcReceive { + accessMode = models.AccessModeRead + } + if !perm.CanAccess(accessMode, unitType) { ctx.HandleText(http.StatusForbidden, "User permission denied") return |