Organizations - Delete projects from list
What does this MR do and why?
Closes #410819 (closed)
Important: This change is behind a feature flag ui_for_organizations
This change adds logic to allow a user to delete a Project from an Organization list view.
Screenshots or screen recordings
Screen_Recording_2024-02-07_at_1.29.49_PM
How to set up and validate locally
Setup Organizations
- Access
rails c
- Enable Feature Flag
Feature.enable(:ui_for_organizations)
- Create the default organization and add root to it
you = User.find_by_username('root')
default_organization = Organizations::Organization.default_organization
Organizations::OrganizationUser.create!(organization_id: default_organization.id, user_id: you.id)
Testing
- Create a test project (or you can use an existing one)
- Navigate to the GDK home page
ex: 127.0.0.1:3000/
- Click Organizations in the sidebar
- Click the Default Organization
- Click the Manage > Groups and projects in the sidebar
- Switch list to Projects in the dropdown
- Click the ... on the project you want to delete
- Ensure modal appears and button is disabled
- Enter project full name and ensure button is enabled
- Click delete button
- Ensure button switches to loading state (may be very quick)
- Ensure list reloads and project is now deleted
Related to #410819 (closed)
Edited by Zack Cuddy