Skip to content

Fix image preview and WebIDE function when disable downloading source code

What does this MR do and why?

Resolves #2632

Fixes bug from !1112 (merged) from #1896 (closed)

Affected Versions

From %15.7

How to re-produce this bug

Turn on feature Disable download source code button in Admin Panel > Settings > General > bottom of Visibility and access controls and save settings

WebIDE

  1. Open a file in repo in WebIDE
  2. and it will show An error occurred while loading the file content. image

Image Preview

  1. Upload an image to a repo
  2. Preview it in the web ui and there will be nothing but a cracked image icon image

Fixture

It will remove the download restrictions for the individual files. eg. http://gdk.test:3000/toolbox/gitlab-smoke-tests/-/raw/master/README.md

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Xueyuan Lin 编辑于

合并请求报告

加载中