Allow JOB-TOKEN access to group packages API
What does this MR do and why?
Allows JOB-TOKEN access to the packages API for groups, similar to how the packages API is currently exposed for all allowed packages for the JOB-TOKEN. The group packages finder has been slightly modified to accomodate JOB-TOKENs by filtering any packages belonging to projects that have restricted access from CI tokens.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
image: curlimages/curl:latest
test:
script:
- touch file.txt
- curl -H "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file file.txt "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/my_package/0.0.1/file.txt"
- sleep 5
- curl -H "JOB-TOKEN: $CI_JOB_TOKEN" "${CI_API_V4_URL}/groups/${CI_PROJECT_NAMESPACE}/packages"
Edited by Jordan Doyle