mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Web editor: disallow edit mirror repository
This commit is contained in:
		@@ -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
 | 
			
		||||
			}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user