Skip to content

[engine] Plus violation handling minds#3681

Ben requested to merge feat/plus-violations-m3681 into master

Ticket(s) / Related Merge Requests

Summary of Changes

Allows demonetization of plus posts and user plus demonetization on 3 reports

Testing Considerations

You will NOT be able to test that a user is demonetized on 3 reports due to a grace window between reports. You CAN however test that when a user IS demonetized for plus, they cannot make plus posts.

Post Demonetization through UI
  1. Make a plus post with one account
  2. Report the post from another NON ADMIN account for the new reason.
  3. Verify for non-plus posts you cannot see the Violates Plus Policy option
  4. With an admin, uphold the report
Through CLI

Make a plus post, then run

source /vault/secrets/env && php cli.php Demonetize post --guid=1470722272175067155

Test various entity types.

Testing user demonetization

Note: currently not working because of read permissions on the user_configurations table. You may have to manually edit the state in the sandbox DB in the user_configurations table by inputting a date into plus_demonetization_ts to demonetize 2023-02-13 12:26:35 and null to remonetize. - I'm including the commands below anyway but all but the bottom one will not work.

### (blocked from user by table config) Demonetize
source /vault/secrets/env && php cli.php Demonetize plusUser --guid=1269338472028573705

### (blocked from user by table config) Remonetize
source /vault/secrets/env && php cli.php Demonetize plusUser --guid=1269338472028573705 --remonetize

### Check state
source /vault/secrets/env && php cli.php Demonetize isPlusUserDemonetized --guid='1269338472028573705'

When you have done this, you can test that you cannot make a post or blog post with the plus tier.

Deployment Considerations

ALTER TABLE user_configurations ADD plus_demonetized_ts timestamp; 
Sandbox

On redeploy, make sure to push helm chart with admin config and the correct reason

Regression Scope

Posting activities / Report admin process / Report modal / Report user process

Platform Affected (web, mobile, etc)

Web

Developer Testing Completed

Manual, unit

Screenshots / Screen Recording

image

minds#3681 (comment 1272911037)

Does this impact

  • Localization
  • Dark/light mode
  • Guest mode

Definition of Done Checklist

  • The Acceptance Criteria has been met
  • Code is tested: Testing includes unit/spec, E2E/automated and manual testing
  • Merge requests description has been filled out
Edited by Ben

Merge request reports

Loading