Hides package registry bulk deletion for users without permission
requested to merge 388076-hide-package-registry-bulk-deletion-ui-for-users-without-permission into master
What does this MR do and why?
Hides package registry bulk deletion for users without permission
This MR uses the permissions injected via availability of settingsPath
Screenshots or screen recordings
Without permission
Before | After |
---|---|
How to set up and validate locally
- Publish few packages with same name & different versions, as mentioned in https://gitlab.com/gitlab-org/ci-cd/package-stage/package/-/wikis/Packages-Tips-&-Tricks#how-to-create-a-list-of-packages-artificially
-
rails c
- Open the rails console -
p = Project.find(1)
- Find one of your GDK projects. Project id can be found on the project home page -
FactoryBot.create_list(:npm_package, 10, project: p, name: p.name)
- Creates 10 npm packages -
Add this line if above fails during the creation of files
def fixture_file_upload(*args, **kwargs) Rack::Test::UploadedFile.new(*args, **kwargs) end
-
- View projects & groups package list page as admin/owner/maintainer - Should be possible to bulk delete & delete packages from UI.
- View projects & groups package list page as developer/reporter - Should not be possible to bulk delete & delete packages from UI.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Closes #388076
Edited by Rahul Chanila