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

Add option to delete moderation notes #10529

Merged
merged 6 commits into from May 1, 2020
Merged

Conversation

blutarch
Copy link
Member

@blutarch blutarch commented Apr 29, 2020

Along with vanilla/internal#2485, this closes vanilla/support#1455.

This PR adds a checkbox option when deleting a user's content to choose whether to delete any moderation notes pertaining to the user's posts.

TO TEST

  1. Create 2 users and add a moderation note for each one.
  2. Check out both this branch and the add/delete-notes-check branch from vanilla/internal.
  3. From dashboard/user, select the first user to delete using the trash can icon.
  4. Choose 'Delete User Content'.
  5. Leave the 'Delete moderation information' box unchecked and click 'Delete User Forever'.
  6. Verify that the user is deleted, but the moderation note is still present (in the Gdn_UserNote table).
  7. Repeat steps 2-4 with the second user.
  8. This time, check the checkbox.
  9. Verify that the moderation note is deleted.

@codecov
Copy link

codecov bot commented Apr 29, 2020

Codecov Report

Merging #10529 into master will increase coverage by 0.05%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master   #10529      +/-   ##
============================================
+ Coverage     53.59%   53.64%   +0.05%     
+ Complexity     8282     3893    -4389     
============================================
  Files           371      373       +2     
  Lines         44288    44420     +132     
============================================
+ Hits          23736    23830      +94     
- Misses        20552    20590      +38     
Impacted Files Coverage Δ Complexity Δ
library/Vanilla/Web/Controller.php 71.73% <0.00%> (-8.86%) 0.00% <0.00%> (ø%)
...s/dashboard/controllers/api/MediaApiController.php 77.77% <0.00%> (-7.33%) 20.00% <0.00%> (-19.00%)
library/Vanilla/Models/VanillaMediaSchema.php 95.00% <0.00%> (-5.00%) 0.00% <0.00%> (ø%)
library/core/class.upload.php 41.37% <0.00%> (-4.03%) 0.00% <0.00%> (-69.00%)
library/Vanilla/Models/ThemeModel.php 49.54% <0.00%> (-3.40%) 0.00% <0.00%> (-76.00%)
library/Vanilla/Models/FsThemeProvider.php 75.15% <0.00%> (-3.17%) 0.00% <0.00%> (-56.00%)
library/Vanilla/Models/ThemePreloadProvider.php 55.42% <0.00%> (-2.69%) 35.00% <0.00%> (+6.00%) ⬇️
library/Garden/Web/Data.php 97.75% <0.00%> (-1.10%) 0.00% <0.00%> (ø%)
library/Vanilla/Models/ThemeModelHelper.php 74.64% <0.00%> (-1.07%) 0.00% <0.00%> (-27.00%)
...oard/controllers/api/AuthenticateApiController.php 83.27% <0.00%> (-0.27%) 62.00% <0.00%> (ø%)
... and 34 more

@blutarch blutarch requested a review from tburry April 30, 2020 21:48
@tburry tburry requested a review from initvector April 30, 2020 22:15
@initvector initvector merged commit add9836 into master May 1, 2020
@initvector initvector deleted the add/mod-notes-checkbox branch May 1, 2020 14:22
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.

None yet

3 participants