Merge pull request #11876 from opf/fix/45459/user-delete-message

Provide better message when users are deleted in background
pull/11883/head
ulferts 2 years ago committed by GitHub
commit 6626131820
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/controllers/users_controller.rb
  2. 2
      config/locales/en.yml
  3. 4
      spec/controllers/users_controller_spec.rb
  4. 6
      spec/features/users/delete_spec.rb

@ -228,7 +228,7 @@ class UsersController < ApplicationController
Users::DeleteService.new(model: @user, user: User.current).call
flash[:notice] = I18n.t('account.deleted')
flash[:notice] = I18n.t('account.deletion_pending')
respond_to do |format|
format.html do

@ -437,7 +437,7 @@ en:
account:
delete: "Delete account"
delete_confirmation: "Are you sure you want to delete the account?"
deleted: "Account successfully deleted"
deletion_pending: "Account has been locked and was scheduled for deletion. Note that this process takes place in the background. It might take a few moments until the user is fully deleted."
deletion_info:
data_consequences:
other: "Of the data the user created (e.g. email, preferences, work packages, wiki entries) as much as possible will be deleted. Note however, that data like work packages and wiki entries can not be deleted without impeding the work of the other users. Such data is hence reassigned to an account called \"Deleted user\". As the data of every deleted account is reassigned to this account it will not be possible to distinguish the data the user created from the data of another deleted account."

@ -306,7 +306,7 @@ describe UsersController, type: :controller do
expect(response).to redirect_to(controller: 'account', action: 'login')
end
it { expect(flash[:notice]).to eq(I18n.t('account.deleted')) }
it { expect(flash[:notice]).to eq(I18n.t('account.deletion_pending')) }
end
describe "WHEN the current user is the requested one
@ -375,7 +375,7 @@ describe UsersController, type: :controller do
expect(response).to redirect_to(controller: 'users', action: 'index')
end
it { expect(flash[:notice]).to eq(I18n.t('account.deleted')) }
it { expect(flash[:notice]).to eq(I18n.t('account.deletion_pending')) }
end
describe "WHEN the current user is the admin

@ -52,7 +52,7 @@ describe 'user deletion:', type: :feature, js: true do
dialog.confirm_flow_with user_password
expect(page).to have_content 'Account successfully deleted'
expect(page).to have_content 'Account has been locked and was scheduled for deletion'
expect(page).to have_current_path '/login'
end
@ -111,7 +111,7 @@ describe 'user deletion:', type: :feature, js: true do
dialog.confirm_flow_with user_password, should_fail: false
expect(page).to have_content 'Account successfully deleted'
expect(page).to have_content 'Account has been locked and was scheduled for deletion'
expect(page).to have_current_path '/users'
end
@ -129,7 +129,7 @@ describe 'user deletion:', type: :feature, js: true do
dialog.confirm_flow_with user_password, with_keyboard: true, should_fail: false
expect(page).to have_content 'Account successfully deleted'
expect(page).to have_content 'Account has been locked and was scheduled for deletion'
expect(page).to have_current_path '/users'
end

Loading…
Cancel
Save