Skip to content

Implement disable download button

What does this MR do and why?

Discussed in issue #17032 (closed).

This MR aims to implement an instance-level prohibition on users downloading packed archives of the entire repo using a feature_flag.

  1. Introduced a feature_flag called disable_download_button for disable download full repo in UI #17032 (closed) .
  2. And it also cuts-off /repo-path/-/archive/<branch>/<repo>-<branch>.<suffix> to 404.

resolves #17032 (closed)

Screenshots or screen recordings

Before:

image

After Feature.enable(:disable_download_button):

image

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

  1. Enable this feature (gdk rails console):
    Feature.enable(:disable_download_button)
  2. randomly pickup a repo in your instance to validate this feature.
  3. check if the download button is disabled

MR acceptance checklist

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

/cc @daveliu

Edited by LXY

Merge request reports