Hide the "Clear cache" dropdown in the dependency proxy page for auditors
Summary
Identified after completing !88096 (merged)
Auditor users are able to see the Clear cache dropdown in a project's Dependency Proxy page. If an auditor attempts to clear the cache, it returns a 403
code which is expected.
In terms of UX, we should hide the Clear cache dropdown.
Steps to reproduce
From GitLab 15.1
:
- As an auditor user, access a project's Dependency Proxy page.
- You should see the Clear cache dropdown on the right side.
Example Project
N/A
What is the current bug behavior?
The Clear Cache dropdown is displayed for auditor users when viewing a project's Dependency Proxy page.
What is the expected correct behavior?
The Clear Cache dropdown should be hidden for auditor users when viewing a project's Dependency Proxy page.
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)
Possible fixes
Visibility is controlled by the showDeleteDropdown
function in https://gitlab.com/gitlab-org/gitlab/-/blob/v14.10.2-ee/app/assets/javascripts/packages_and_registries/dependency_proxy/app.vue#L184-200