Projects List - Abstract EE component
What does this MR do and why?
Follow up from !145338 (merged)
Important: This change is behind a feature flag ui_for_organizations
This change abstracts the some EE specific code around the Project List Item badges into an ee_else_ce
scenario. The logic in particular being abstracted is the Pending deletion
badge as this is an EE only feature
Screenshots or screen recordings
Before | After (No change) |
---|---|
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 two test projects (be sure to do this under an existing group)
- Mark one project for deletion
a. Navigate to project
b. Settings -> General in side bar
c. Expand Advanced tab
d. Click delete project button and follow instructions
e. Project should be marked for deletion (noted by banner on project overview)
- Mark other project as archived
a. Navigate to project
b. Settings -> General in side bar
c. Expand Advanced tab
d. Click archive project
e. Project should be marked as archived/read-only (noted by banner on project overview)
- 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
- Ensure badges appear correctly for the projects you just acted on
- You can repeat with a CE configured GDK to ensure the pending deletion badge does not appear
- You can also "spoof" the CE component by changing the
ee_else_ce/
import inproject_list_item.vue
to use the~/
import instead.
- You can also "spoof" the CE component by changing the