Indicate to admins that users that are the sole owner of a group can only be hard deleted

Follow up from #337156 (closed)

In #332846 (closed) we moved all the admin user actions from cards to a dropdown. Before we did this there was a message that no longer exists:

Screen_Shot_2021-07-29_at_8.40.15_AM

Now there is no message explaining to admins why Delete user and contributions (hard delete) exists but Delete user does not exist.

Proposal

Figma work file

Dropdown Dropdown in users list Modal pop up on delete Groups and projects container in user details
Availble Option_2 Modal Frame_9

Implementation plan

  1. Remove if @user.can_be_removed? from app/helpers/admin/user_actions_helper.rb#L53
  2. Add expose :solo_owned_groups to app/serializers/admin/user_entity.rb#L14
  3. Add soloOwnedGroups: 'SOLO_OWNED_GROUPS' to app/assets/javascripts/vue_shared/components/user_deletion_obstacles/constants.js#L4
  4. Update app/assets/javascripts/vue_shared/components/user_deletion_obstacles/user_deletion_obstacles_list.vue to render the correct message.
    • Create new obstacle components and then dynamically render the correct obstacle component.
  5. Update specs

Availability & Testing

Ensure end-to-end tests pass by running the package-and-qa job

Edited by Daniel Mora