Job details sidebar breaks when using `artifacts:access` or `artifacts:public` keyword
Summary
When using one of the following CI config settings for a job:
-
artifacts:access
set todeveloper
ornone
-
artifacts:public
set tofalse
the Job details page fails to load the sidebar when viewing as someone who can't see the artifact.
Steps to reproduce
- Create a job in a public project that uploads an artifact
- Set the keyword
artifacts:access
todeveloper
- Run the pipeline
- View the job from a role that is not a developer+ of the project (just open incognito and go to the job details page)
- See that the sidebar does not load
Example Project
https://gitlab.com/shampton/test-artifact-access/-/jobs/6530619369
What is the current bug behavior?
The sidebar doesn't load
What is the expected correct behavior?
The sidebar should load, but the buttons to view the artifacts should not appear.
Relevant logs and/or screenshots
JS console error:
Click to expand
TypeError: can't convert undefined to object
hasArtifact sidebar.vue:48
VueJS 3
Re sidebar.vue:1
VueJS 7
Output of checks
This bug happens on GitLab.com
Possible fixes
Looks like it's something to do with the hasArtifact()
function in the sidebar.vue file.
Edited by Miranda Fluharty