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.
- Introduced a feature_flag called
disable_download_button
for disable download full repo in UI #17032 (closed) . - And it also cuts-off
/repo-path/-/archive/<branch>/<repo>-<branch>.<suffix>
to 404.
resolves #17032 (closed)
Screenshots or screen recordings
Before:
Feature.enable(:disable_download_button)
:
After
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
- Enable this feature (
gdk rails console
):Feature.enable(:disable_download_button)
- randomly pickup a repo in your instance to validate this feature.
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
/cc @daveliu
Edited by LXY