Commit d6da528b authored by Mark Fletcher's avatar Mark Fletcher

Note Ghost user and refer to user deletion documentation

+ Add a partial for displaying user deletion guidance
parent 03f13af5
...@@ -175,11 +175,7 @@ ...@@ -175,11 +175,7 @@
.panel-body .panel-body
- if @user.can_be_removed? && can?(current_user, :destroy_user, @user) - if @user.can_be_removed? && can?(current_user, :destroy_user, @user)
%p Deleting a user has the following effects: %p Deleting a user has the following effects:
%ul = render 'users/deletion_guidance', user: @user
%li All user content like authored issues, snippets, comments will be removed
- rp = @user.personal_projects.count
- unless rp.zero?
%li #{pluralize rp, 'personal project'} will be removed and cannot be restored
%br %br
= link_to 'Remove user', [:admin, @user], data: { confirm: "USER #{@user.name} WILL BE REMOVED! Are you sure?" }, method: :delete, class: "btn btn-remove" = link_to 'Remove user', [:admin, @user], data: { confirm: "USER #{@user.name} WILL BE REMOVED! Are you sure?" }, method: :delete, class: "btn btn-remove"
- else - else
......
...@@ -118,11 +118,7 @@ ...@@ -118,11 +118,7 @@
- if @user.can_be_removed? && can?(current_user, :destroy_user, @user) - if @user.can_be_removed? && can?(current_user, :destroy_user, @user)
%p %p
Deleting an account has the following effects: Deleting an account has the following effects:
%ul = render 'users/deletion_guidance', user: current_user
%li All user content like authored issues, snippets, comments will be removed
- rp = current_user.personal_projects.count
- unless rp.zero?
%li #{pluralize rp, 'personal project'} will be removed and cannot be restored
= link_to 'Delete account', user_registration_path, data: { confirm: "REMOVE #{current_user.name}? Are you sure?" }, method: :delete, class: "btn btn-remove" = link_to 'Delete account', user_registration_path, data: { confirm: "REMOVE #{current_user.name}? Are you sure?" }, method: :delete, class: "btn btn-remove"
- else - else
- if @user.solo_owned_groups.present? - if @user.solo_owned_groups.present?
......
- user = local_assigns.fetch(:user)
%ul
%li
%p
Certain user content will be moved to a system-wide "Ghost User" in order to maintain content for posterity. For further information, please refer to the
= link_to 'user account deletion documentation.', help_page_path("user/profile/account/delete_account", anchor: "associated-records")
- personal_projects_count = user.personal_projects.count
- unless personal_projects_count.zero?
%li #{pluralize(personal_projects_count, 'personal project')} will be removed and cannot be restored
---
title: Note Ghost user and refer to user deletion documentation
merge_request:
author:
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment