Refactor GitAccess and related code to remove build_download_code
The following discussion from gitlab-ce!11398 should be addressed:
-
@DouweM started a discussion: (+5 comments) Do you understand why we have a separate
build_download_codeanddownload_code? ://cc @ayufan
...
What we want to accomplish is that
GitAccessgives admin users access to all projects unless the access check is coming from a CI build, in which caseGitAccessshould only allow access to projects the admin has access to through normal non-admin means, like being a member, the project being public etc.We could accomplish this by telling
GitAccessthat the request is coming from a CI build, and not just checkingcan?(current_user, :download_code, project)in this case, but also verifying the reason for this access.
Edited by 🤖 GitLab Bot 🤖