From 579e5e4fee59f01f8a438e7ef977f34fa5dba72c Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sun, 28 Aug 2016 04:56:41 -0700 Subject: Web editor: disallow edit mirror repository --- cmd/web.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/web.go b/cmd/web.go index 85fc01962e..df7e970afd 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -511,7 +511,7 @@ func runWeb(ctx *cli.Context) error { // m.Post("/upload-file", repo.UploadFileToServer) // m.Post("/upload-remove", bindIgnErr(auth.RemoveUploadFileForm{}), repo.RemoveUploadFileFromServer) }, reqRepoWriter, context.RepoRef(), func(ctx *context.Context) { - if ctx.Repo.IsViewCommit { + if !ctx.Repo.Repository.CanEnableEditor() || ctx.Repo.IsViewCommit { ctx.Handle(404, "", nil) return } -- cgit v1.2.3