Commit graph

54 commits

Author SHA1 Message Date
Molly Struve
0a51540a4c
[deploy] Hotfix: Disable Article Sinking (#9237) 2020-07-09 17:19:06 -05:00
rhymes
5b62811c98
[deploy] Rubocop: fix violations of Layout/LineLength (#9197) 2020-07-08 08:36:36 -05:00
rhymes
40f54e317f
[deploy] Use Action Mailer parameterized syntax (#8853) 2020-06-23 13:48:41 -05:00
Molly Struve
dd1cfd33e0
Remove video_permissions Role Reference From Specs and Code (#8344) 2020-06-08 10:23:53 -05:00
Michael Kohl
780d254690
[deploy] Fix badge count update after merge (#8210) 2020-06-01 14:01:46 -04:00
Molly Struve
ee373fa6c0
[deploy] Remove Algolia from Article Model (#7540) 2020-04-28 09:55:48 -05:00
Rafi
bdcfba7d70
[deploy] Saving youtube url (#7516)
* Saving youtube url

* Fixing description in the spec

* Optimizing youtube logo svg

* Fixing indentation of form
2020-04-27 14:14:07 -04:00
Molly Struve
a7e664fc9c
[deploy] Remove Algolia from User Model (#7454)
* Remove Algolia from User Model

* check banned on self for user

* fine have your redundant method

* remove a couple more unnecessary specs
2020-04-24 18:39:36 -04:00
Molly Struve
13e8ea1f64
Ensure records are updated properly after a user merge (#7416) 2020-04-21 14:17:11 -04:00
Molly Struve
40f15e68d0
[deploy] Delete all users via the DeleteWorker for consistency (#7013) 2020-04-02 19:26:58 -04:00
Molly Struve
05b6220e2d
[deploy] reindex articles to Elasticsearch in places where relations are updated or update_column is used (#7003) 2020-04-01 10:59:30 -05:00
Andy Zhao
478d1b36a5
Hide banished users vomit confirmations and delete vomit reactions on banish (#6507) [deploy]
* Update to hide only banished users

* Refactor and move into a model method

* Delete vomits on banished users

* Add tests for banishing users
2020-03-06 15:35:30 -05:00
rhymes
145d5e610e
Use scopes for Follow instead of where all the time (#6149) [deploy] 2020-02-25 19:29:52 -05:00
Andy Zhao
acd3b92b32
Add sink user service and specs for mass vomits (#6006)
* Add sink user service and specs for mass vomits

* Use new score calculation

* Lower articles' scores instead and make async

* Add lower score functionality to controllers

* Remove unused variable

* Use correct var and add missing arg

* Remove unused status

* Add composite index for reactable_type and ID

* Use alias instead of additional boolean

* Use medium priority for sink worker

* Log to honeybadger and not logs

* Log the error and not a string
2020-02-17 10:29:50 -05:00
Michael Kohl
7270d5ab4c
Move user deletion by moderator to worker (#5887) [deploy] 2020-02-05 08:27:07 -05:00
Michael Kohl
a26ea73771
Remove direct chat channels when banishing user (#5784) [deploy]
* Remove direct chat channels when banishing user

* Also remove article's buffer updates

* Incorporate PR feedback and make deletion safer
2020-02-04 17:10:39 -05:00
Michael Kohl
5b35370db8 Introduce BanishedUser table (#5589) [deploy] 2020-01-21 17:15:58 -05:00
Molly Struve
7c650dcb1c
Remove RedisRailsCache and replace with Rails.cache (#5059) [deploy] 2019-12-10 13:11:08 -06: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
Ben Halpern
af04fd7959
Add additional conditions to internal/reports page (#4800) [deploy]
* Add additional conditions to internal/reports page

* Add higher number for randomness
2019-11-12 13:19:08 -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
tariq-abughofa
267ec36460 Move users' has_trusted_role keys to redis (#4697) [deploy] 2019-11-04 13:12:19 +00:00
Ben Halpern
208bbb3757
Improve mod roundrobin notification and internal tooling (#3855)
* Improve mod roundrobin notification and internal tooling

* Fix tests
2019-08-27 21:54:09 -04:00
cyrillefr
369aeb9130 Fix comment deletion bug (#3732)
Fix bug where deleted comment still appears on user's profile
2019-08-27 17:07:09 -04:00
Mac Siri
9f6cf61911
Update Banisher (#3495) [ci skip] 2019-07-16 19:08:06 -04:00
Andy Zhao
4da791e5af Cache bust the article's path and add minor improvement for banishing (#3492) 2019-07-16 13:17:29 -04:00
Bolarinwa Balogun
b52d8e931d Add Instagram URL to profile links (#3307) 2019-06-26 08:56:07 -04:00
rhymes
91de529705 Remove code for legacy mentoring feature (#3186) 2019-06-21 17:18:11 -04:00
Andy Zhao
a55bce99ac Cache bust banished users' posts after the posts are deleted (#3044)
* Bust article caches after they've been deleted

* Use less instances of cachebuster class
2019-06-04 15:04:30 -04:00
rhymes
6a626e819d Refactor: fix issues raised by bullet (#2965)
* Preload organization, not user

* Preload users only when needed

* Pre-load podcasts for podcast episodes in API

* Avoid eager loading error by loading rating votes separately

* Preload associations for moderation

* Preload user comments in trees

* Preload organization for non org dashboard and cleanup queries

* Optimize ArticleSuggester to only load N articles at need

* Remove eager loading and pass variables to partials for easier debug

* Reorganize tags validation code and ignore actsastaggableon eager loading issues

* Remove unused eager loading and bring up comments relation

* Preload podcasts when loading podcast episodes

* Fix views specs

* Make sure ArticleSuggester never returns duplicates

* Remove commented code

* Re-trigger build

* Move suggested articles back to view to respect fragment caching
2019-05-28 17:32:53 -04:00
Jess Lee
8915fe3178 bust ghost cache and reindex articles (#2837) 2019-05-14 20:51:47 -04:00
Jess Lee
486275cbbb Implement ghostify (#2773) 2019-05-14 16:50:14 -04:00
Jess Lee
9bb409e818 Clear cache on sidebars on user merge (#2562)
* clears rails cache on sidebars

* update profile and sidebar in one line
2019-04-26 19:44:59 -04:00
Bolarinwa Balogun
1578befdf1 Add Twitch to Profile Links (#2557) 2019-04-25 16:14:28 -04:00
Jess Lee
834b9423da Unsub users only if they have an email (#2556) 2019-04-25 15:46:40 -04:00
Conor Souhrada
9be054d3dc Wrap Moderater::MergeUser#update_social in a transaction (#2281) 2019-04-16 14:52:35 -04:00
Jess Lee
f637d9e02b Manage tag and community mod lists in Mailchimp (#2362)
* add moderation email list columns

* automate tag moderator mailing list

* reorder logic for tag mod list

* add community mod list

* remove trusted privileges when reverting a user to a regular member

* automatically make tag mods community mods

* fix merge conflicts

* add community view

* make methods less complex based on code climate sugggestion

* add specs

* refactor tag moderator module

* fix spec
2019-04-10 14:45:06 -04:00
Andy Zhao
7ade338002 Use nil instead of empty string w/ new db constraints (#2300) 2019-04-03 17:28:08 -04:00
Jess Lee
9f74fd3794 Clear cache when merging users (#2229) 2019-03-28 12:26:14 -04:00
Jess Lee
1b0cb47916 Merge user and give pro users trusted role (#2176)
* remove pro privelges from other roles and add trusted role for pros

* add merge user routes and methods

* add specs

* add more specs

* update languauge on /internal for clarity

* fix code climate error
2019-03-22 16:20:31 -04:00
Jess Lee
9c1e10cd9f Improve Internal Dashboards features(#2043) 2019-03-18 16:29:11 -04:00
Keshav Biswa
8d57d45ecc Rubocop Style cops enabled (#2056)
* Rubocop enabled style/alias

* Enabled Style/ArrayJoin Cop

* Enabled Style/Attr

* Enabled Case Equality

* Enabled CharacterLiteral

*  Enabled ColonMethodCall Cop

* Enabled CommentAnnotation cop

* Enabled PreferredHashMethods Cop

*  Enabled DoubleNegation Cop

* Enabled EachWithObject Cop

* Enabled EmptyLiteral Cop

* Enabled EvenOdd Cop

* Enabled IfWithSemicolon Cop

* Enabled Lambda and LambdaCall Cop

* Enabled LineEndConcatenation Cop

* Enabled ModuleFunction Cop;

* Enable NegatedIf and NegatedWhile Cop

* Enabled NilComparison Cop

* Enabled Not Cop

* Enabled NumericLiterals Cop

* Enabled OneLineConditional Cop

* Enabled PercentLiteralDelimiters Cop

* Excluded internal/users_controller from negated_if cop

* Reverted the double negation change from github_issue_tag and github_issue.rb"

* Enabled PerlBackrefs Cop

* Changed Regexp.last_match(1) to Regexp.last_match(0)

* Enabled proc cop

* Enabled RaiseArgs Cop

* Reverted Regexp.last_match(0) to Regexp.last_match(1)

* Enabled SelfAssignment Cop

* Enabled SingleLineMethods Cop

* Enabled SpecialGlobalVars Cop

* Enabled VariableInterpolation Cop

* Enabled WhenThen Cop

* Enabled WhileUntilModifier Cop

* Enabled WordArray Cop

* Enabled IfUnlessModifier Cop

* Enabled GuardClause Cop
2019-03-15 18:33:54 -04:00
Andy Zhao
f93af16fbe Remove notifications when banishing and deleting a user (#2039)
* Make remove_notifications a public method

* Remove notifications when banishing or deleting
2019-03-13 17:54:47 -04:00
Andy Zhao
84fbbed82a Add profile_updated_at to clear cache key (#1795) 2019-02-14 12:05:47 -05:00
Jess Lee
af2915b086 Fix Banisher Updates (#1704)
* delete activity before updating username

* fix linting

* remove unnecssary return
2019-02-01 17:10:17 -04:00
Jess Lee
d36418a62a Clear profile cache on banish (#1702)
* save spam username as old username

* keep old username for reference
2019-01-31 15:38:01 -04:00
Jess Lee
9d72091f42 add mailchimp unsub when deleting or banishing user (#1644) 2019-01-24 16:14:10 -05:00
Jess Lee
0eb5402926 Delete User Functionality (#1615)
* add full delete route and update banisher

* add user deletion spec

* enhance styling

* remove availability if banned from mentorship

* add specs

* do not show banned mentors

* delete addiional associations

* include more associations for deletion

* simplify activity deletion wtih delete_all
2019-01-23 16:57:32 -05:00
rhymes
dee7429883 Replace each with find_each for AR queries (#1557) 2019-01-15 16:38:03 -05:00
Ben Halpern
2fd314e40b
Fix chat css and banish logic (#1515) 2019-01-10 18:09:42 -05:00