aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-08-28 04:56:41 -0700
committerUnknwon <u@gogs.io>2016-08-28 04:56:41 -0700
commit579e5e4fee59f01f8a438e7ef977f34fa5dba72c (patch)
treeeb949bc9c4a8024067ca1a81f47f1f2c8c48d002 /cmd
parentba27d71abea437af2f0612a8960eea651ec2df59 (diff)
downloadgitea-579e5e4fee59f01f8a438e7ef977f34fa5dba72c.tar.gz
gitea-579e5e4fee59f01f8a438e7ef977f34fa5dba72c.zip
Web editor: disallow edit mirror repository
Diffstat (limited to 'cmd')
-rw-r--r--cmd/web.go2
1 files changed, 1 insertions, 1 deletions
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
}