Commit 153b48f9 authored by Jacopo's avatar Jacopo

Allow all users to delete their account

Previously the user could not delete his own account unless signup was
enabled in the global settings. This was due to the fact that deleting
the user would also delete the issues and other items associated to him.
Deleting an user does not destroy essential data anymore, for this
reason we removed the `signup_enabled?` check.
parent bb9db75f
...@@ -92,8 +92,7 @@ ...@@ -92,8 +92,7 @@
Update username Update username
%hr %hr
- if signup_enabled? .row.prepend-top-default
.row.prepend-top-default
.col-lg-4.profile-settings-sidebar .col-lg-4.profile-settings-sidebar
%h4.prepend-top-0.danger-title %h4.prepend-top-0.danger-title
Remove account Remove account
......
---
title: allow all users to delete their account
merge_request: 13636
author: Jacopo Beschi @jacopo-beschi
type: changed
...@@ -7,9 +7,8 @@ describe 'Profile account page' do ...@@ -7,9 +7,8 @@ describe 'Profile account page' do
sign_in(user) sign_in(user)
end end
describe 'when signup is enabled' do describe 'when I delete my account' do
before do before do
stub_application_setting(signup_enabled: true)
visit profile_account_path visit profile_account_path
end end
...@@ -21,18 +20,6 @@ describe 'Profile account page' do ...@@ -21,18 +20,6 @@ describe 'Profile account page' do
end end
end end
describe 'when signup is disabled' do
before do
stub_application_setting(signup_enabled: false)
visit profile_account_path
end
it 'does not have option to remove account' do
expect(page).not_to have_content('Remove account')
expect(current_path).to eq(profile_account_path)
end
end
describe 'when I reset private token' do describe 'when I reset private token' do
before do before do
visit profile_account_path visit profile_account_path
......
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