Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#1548] Refactor profile deletion flow #683

Merged
merged 3 commits into from
Jun 23, 2023
Merged

Conversation

pi-sigma
Copy link
Contributor

Taiga: #1548

Refactor profile deletion flow:

  • Before deleting, check if there are plans associated with the user profile and warn user, if appropriate
  • After check, delete user immediately instead of deactivating and waiting 14 days

@pi-sigma pi-sigma force-pushed the fix/1548-profile-deletion branch 3 times, most recently from 3466240 to 09ba067 Compare June 21, 2023 07:54
@pi-sigma pi-sigma marked this pull request as ready for review June 21, 2023 08:48
@pi-sigma pi-sigma requested a review from vaszig June 21, 2023 08:48
Copy link
Contributor

@vaszig vaszig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Please update the name of the form as well ( deactivate-form ) in order to be more clear what we are doing here.
  • Update the User's deactivated_on field - clear enough that this is deprecated
  • Do a search for "deactivate", there are a couple of spots that could be updated as well

src/open_inwoner/accounts/tests/test_profile_views.py Outdated Show resolved Hide resolved
src/open_inwoner/accounts/views/profile.py Outdated Show resolved Hide resolved
src/open_inwoner/accounts/views/profile.py Outdated Show resolved Hide resolved
src/open_inwoner/accounts/views/profile.py Outdated Show resolved Hide resolved
src/open_inwoner/accounts/views/profile.py Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Jun 21, 2023

Codecov Report

Merging #683 (63d23fa) into develop (1282e20) will decrease coverage by 0.01%.
The diff coverage is 94.33%.

@@             Coverage Diff             @@
##           develop     #683      +/-   ##
===========================================
- Coverage    96.17%   96.16%   -0.01%     
===========================================
  Files          633      635       +2     
  Lines        22665    22641      -24     
===========================================
- Hits         21797    21772      -25     
- Misses         868      869       +1     
Impacted Files Coverage Δ
src/open_inwoner/accounts/models.py 97.66% <ø> (-0.04%) ⬇️
src/open_inwoner/cms/cases/views/status.py 89.18% <0.00%> (+0.79%) ⬆️
src/open_inwoner/conf/base.py 95.53% <ø> (-0.03%) ⬇️
src/open_inwoner/openklant/views/contactform.py 92.85% <75.00%> (-0.83%) ⬇️
...er/openklant/migrations/0005_auto_20230621_1143.py 77.77% <77.77%> (ø)
...ounts/migrations/0062_alter_user_deactivated_on.py 100.00% <100.00%> (ø)
src/open_inwoner/accounts/tests/test_logging.py 100.00% <100.00%> (ø)
.../open_inwoner/accounts/tests/test_profile_views.py 100.00% <100.00%> (ø)
src/open_inwoner/accounts/views/profile.py 99.41% <100.00%> (+0.02%) ⬆️
src/open_inwoner/openklant/admin.py 78.57% <100.00%> (+2.57%) ⬆️
... and 5 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@pi-sigma pi-sigma requested a review from vaszig June 23, 2023 06:43
Copy link
Contributor

@vaszig vaszig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small remarks and this can be merged.

Please update the form name ("deactivate-form" is not representative) and in my opinion the help-text of the User's model field (deactivated_on) should mention that this is deprecated since the account is now deleted.

src/open_inwoner/accounts/views/profile.py Outdated Show resolved Hide resolved
@pi-sigma pi-sigma changed the title [#1548] profile deletion [#1548] Refactor profile deletion flow Jun 23, 2023
@alextreme
Copy link
Member

@vaszig can this be approved now? Would like to get this into the v1.8 release

@vaszig
Copy link
Contributor

vaszig commented Jun 23, 2023

@vaszig can this be approved now? Would like to get this into the v1.8 release

Yes, sure. I thought it was not ready yet.

@alextreme
Copy link
Member

Appreciated, thanks guys!

@alextreme alextreme merged commit 867bce2 into develop Jun 23, 2023
@alextreme alextreme deleted the fix/1548-profile-deletion branch June 23, 2023 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants