Files links attached to tags are broken on releases view in private projects

Summary

File attached to new tag in private project, is not properly rendered on releases view

Steps to reproduce

  1. Create new private project
  2. Initialize it with at least one commit
  3. Go to Repository -> Tags
  4. Click New tag
  5. Add tag name
  6. Click Attach a file and attach file, file type doesn't matter, could be PNG image for example
  7. Click Create tag
  8. Go to Project -> Releases
  9. Link to file attached before is broken, gitlab returns HTTP 404

Example Project

This project is currently made public, and links to files attached to tags are properly rendered, but in case project change from public to private, links to files are going to be broken.

https://gitlab.com/piotr.bladek/tag-release-link-public

What is the current bug behavior?

Links to files on releases view in private project are not rendered properly

What is the expected correct behavior?

Links should work on releases view, and tags listing as well, in both private and public projects

Relevant logs and/or screenshots

Image have proper link on tags listing, and displays properly, image link in this view https://gitlab.com/piotr.bladek/tag-release-link-public/uploads/443c5a7572d1ae8488a8a418596b935a/piesek.jpg: tag-listing

Image in public project on releases list displays properly, image link in this view https://gitlab.com/piotr.bladek/tag-release-link-public/uploads/443c5a7572d1ae8488a8a418596b935a/piesek.jpg (same as above): releases-listing-public

After project visibility changed from public into private image link seems to be broken and returns HTTP 404, image link in this view https://gitlab.com/uploads/443c5a7572d1ae8488a8a418596b935a/piesek.jpg (different from above): releases-listing-private

Output of checks

This bug happens on GitLab.com

Assignee Loading
Time tracking Loading