• Markus Koller's avatar
    Fix internal lfs_authenticate API for non-project repositories · 88dec65c
    Markus Koller authored
    This endpoint is used for LFS over SSH and had two problems:
    
    1. We were generating the repository URL from `project` rather than
       `container`, which means we'd return the wrong URL for e.g. project
       wiki repositories.
    
       In practice this didn't break LFS, as we're not touching the
       repository itself and just associating the objects with the project
       record, which works the same with project wikis.
    
    2. We did not check if LFS is enabled, which means we'd still return a
       URL for project snippets. This is less of a problem as the subsequent
       HTTP requests to the LFS controllers would still fail, but it's
       better to be consistent and abort early here.
    
    Follow-up to https://gitlab.com/gitlab-org/gitlab/-/merge_requests/45874
    88dec65c
has_repository.rb 2.58 KB