Commit graph

9 commits

Author SHA1 Message Date
Jacob Herrington
a5b2d109d5
Rename banned and comment_banned roles (#12270)
* Rename banned and comment_banned roles

* Add data update script to rename roles containing 'ban'

* Add named error for Suspended users

* Update unidiomatic method names

* Rename misc banned to suspended

* Apply suggestions from code review

Co-authored-by: Michael Kohl <me@citizen428.net>

* Add unit tests for suspended methods

This commit also adds TODO comments for removing banned and
comment_banned from the codebase after data update scripts have
successfully run on all of our Forems.

Co-authored-by: Michael Kohl <me@citizen428.net>
2021-04-06 10:12:14 -05:00
Mac Siri
009c14653a
Fix app/services' ruby 2.7 kwargs warnings (#13177) 2021-04-01 18:40:50 -04:00
Michael Kohl
0af8fc1866
Prevent suspended users from self-deleting and returning (#12503)
* Add new table and model

* Store banned user username hash on delete

* Prevent previously banned user from signing up again

* Update method name

* Refactor code and add more specs

* Test improvements

* Don't override existing global flash

* Fix typo

* Update spec description

* Update schema.rb

* More schema.rb fixes

* Simplify spec

* Update migration

* Clean up migration

* Rename method

* Add DataDog counter

* Revisit error handling

* Remove spurious empty line

* Make model name more explicit
2021-02-11 09:28:59 +07:00
Alex
f70af66258
Update bust to EdgeCache::Bust (#12052)
* Update bust to EdgeCache::Bust

* Update specs

* Fix more specs

* Fix more specs :)
2020-12-29 09:53:15 +01:00
Molly Struve
40f15e68d0
[deploy] Delete all users via the DeleteWorker for consistency (#7013) 2020-04-02 19:26:58 -04:00
Molly Struve
7c650dcb1c
Remove RedisRailsCache and replace with Rails.cache (#5059) [deploy] 2019-12-10 13:11:08 -06:00
Anna Buianova
cfd5434d6c User deletion by email (#4863) [deploy]
* Action to request account deletion by email

* Confirmation page for user destroy

* Remove some of the old destroy user code

* System tests for user destroy

* Moved user destroy tokens to redis

* Change tests according to the new user destroy token storage (in redis)

* Added info about the link to user delete confirmation email

* Remove blank like from schema.rb

* Delete user destroy token on user delete

* Update confirm user destroy js
2019-11-29 13:47:11 -05:00
Michael Kohl
b57ced5466 CacheBuster refactoring (#4766)
* Turn CacheBuster into a module

This class used no internal state, so repeatedly creating short-lived objects seems wasteful.

* Consistently use string interpolation and parenthesis

* Destructure arrays into meaningful names, formatting

* Fix request spec for internal classified listings controller

Interestingly this works when asserting directly on the module, but not on a double.
Asserting directly in the module seems sufficient for this test so the indirection
was removed.

* Turn CacheBuster into a module

This class used no internal state, so repeatedly creating short-lived objects seems wasteful.

* Fix specs after rebasing
2019-11-13 10:51:23 -05:00
Anna Buianova
8c58be75f5 Self-deleting user account (#4480) [deploy]
* Start with self deleting account

* Moved deleting user content and activity out of moderator hierarchy

* Added tests for the users delete services

* Tests for Users::DeleteComments

* User self-deletion (start)

* Some tests for user self-delete

* Specs for user self-deletion

* Test flash settings on users delete

* Added basic specs for the Users::DeleteJob

* Send notification when a user was destroyed

* Rename Users::DeleteJob to SelfDelete

* Change texts about self-deletion

* Fix users delete job spec

* Rescue and log exceptions while self-deleting user

* Added visible flash notices after deleting user

* Remove unneeded css for flash notice

* Fix link to a ghost account

* Remove redundant css

* Added github and twitter oauth apps links
2019-11-11 14:59:01 -05:00