Fix job sidebar when artifact access is restricted
What does this MR do and why?
Fix job sidebar when artifact access is restricted
Account for the case where job.artifact can be null/undefined when artifacts:public or artifacts:access is used to restrict access
Changelog: fixed
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
- set up a job with artifacts that your role won't be able to see by setting
artifacts:access
tonone
orartifacts:public
tofalse
:
potato:
stage: build
script:
- echo 'potato' >> potato.txt
artifacts:
access: 'none'
expose_as: 'potato'
paths: ['potato.txt']
- run that job and navigate to its job log page
- verify that the sidebar shows up
- verify that the artifacts section is not shown because the artifacts have been access-restricted
Related to #454144 (closed)
Edited by Miranda Fluharty