Commit graph

574 commits

Author SHA1 Message Date
Mac Siri
30fa3b79a3
Default to Imgproxy on Forem-cloud (#10819) 2020-10-14 12:54:59 -04:00
Jacob Herrington
c37b283865
Allow Forem admins to enable an invite only mode. (#10758)
* Add invite only mode field to SiteConfig

* Add UI elements for invite only mode
2020-10-12 11:27:22 -04:00
Michael Kohl
f95acef2bc
Profile generalization tidbits (#10631)
* Load all profile fields on app start

This time without breaking bin/setup (hopefully)

* A SiteConfig.dev_to? for special case logic

* Update BanishUser#remove_profile_info

* Continue clearing data from users table for now

* Add specs for SiteConfig#dev.to?

* Use correct attribute list

* Update spec/models/site_config_spec.rb

Co-authored-by: Michael Currin <18750745+MichaelCurrin@users.noreply.github.com>

Co-authored-by: Michael Currin <18750745+MichaelCurrin@users.noreply.github.com>
2020-10-12 10:01:27 +07:00
Mac Siri
e7c1b3e993
Move Imgproxy endpoint config to Images::Optimizer (#10742) 2020-10-09 10:50:30 -04:00
Rafal Trojanowski
2a488a19f8
Articles API: filtering by tags (#3654) (#10614)
* Articles API: filtering by tags (#3654)

* Address CR comments (#3654)

* Add test case
* Move tests
* Update docs

* Use _any_ option for querying by tags (#3654)
2020-10-09 12:49:34 +02:00
Michael Kohl
a2b55f889c
Remove Twitch integration (#10732)
* Remove Twitch integration

* Ignore columns
2020-10-08 12:44:10 +00:00
Ben Halpern
36b1edb3e2
[deploy] Ensure podcast episodes are created with processed_html (#10715) 2020-10-07 12:09:36 -04:00
Ben Halpern
0ed408a409
Fix feed order for basic (#10717)
* Fix feed order for basic

* Fix spec
2020-10-07 11:26:32 -04:00
Brunno Souza
120bd7940f
Move method #approved_liquid_tags to user service (#10663) 2020-10-07 12:04:08 +07:00
Vaidehi Joshi
52fd043c33
[deploy] Limit articles created by newer users (#10686)
* Limit articles created by newer users

* Fix typo in test
2020-10-06 21:02:05 -04:00
Ben Halpern
f87e9eace1
[deploy] Add feed_strategy config (#10245)
* Add feed_strategy config

* Add configs spec

* Fix specs

* Fix field test scenario

* Linting

* A couple small changes

* Rename Optimized and objects

* Add proper namespace

* Fix codeclimate

* Add docs

* Update docs/technical-overview/readme.md
2020-10-06 17:36:27 -04:00
Ben Halpern
eefbe25bd3
[deploy] Add ability for admin to add anti-spam terms (#10615)
* Add ability for admin to add anti-spam terms

* Fix specs

* Fix tests

* Fix typo

* Fix test
2020-10-06 10:10:30 -04:00
Brunno Souza
e5973ebf9c
Refactoring user_controller separating some classes to service (#10384)
* Refactoring user_controller separating some classes to service

* Replace service Credit::Manager and improve yours specs

* improve method with memoize
2020-10-05 10:41:59 +02:00
Anna Buianova
f6a7a42acc
Slack notification with reminder to delete user gdpr data (#10532) 2020-10-02 10:12:12 -04:00
Vaidehi Joshi
6a697173bc
Split EdgeCache::Bust into Fastly + Nginx-specific classes (#10505) [deploy]
* Split EdgeCache::Bust into Fastly + Nginx-specific classes

* Update EdgeCache::Bust service specs

* Move Nginx TODO comment into Nginx-specific file
2020-10-01 10:07:51 -07:00
Molly Struve
d2d9984f28
[deploy] Return Cache Bust Response When Busting a Cached Path (#10500) 2020-09-30 17:17:04 -05:00
rhymes
fe75dcde1c
Routine rubocop fixes (#10478) 2020-09-29 10:14:26 -04:00
Mac Siri
8d9db4cce1
Update Imgproxy to use predetermined endpoint (#10412) 2020-09-28 18:30:29 -04:00
Molly Struve
9eb0833134
[deploy] Bug Fix:Remove More ReadingList Index Code (#10439) 2020-09-25 13:40:54 -05:00
Molly Struve
e9cb7b2fd9
[deploy] Refactor:Remove Reaction Search Code (#10377) 2020-09-23 12:27:50 -05:00
Molly Struve
b0e086346d
[deploy] Refactor:Remove BackupData Model and Code (#10409) 2020-09-22 16:45:18 -05:00
Vaidehi Joshi
d5f810a6f8
[deploy] Refactor edge caching logic to live in EdgeCache::Service (#10369)
* Refactor edge caching logic to live in EdgeCache::Service

* Rename EdgeCache::Service to EdgeCache::Buster

* Reorganize some code, move from Buster to Bust naming
2020-09-18 16:41:40 -05:00
Ben Halpern
1a531bca0e
Replace need for GitHub ENV vars on bootup (#10372)
* Un-eagerload dev mode

* Change approach

* Fix for_user

* Fix spec?

* Fix spec?

* Fix spec?

* Fix spec?

* Fix spec?
2020-09-18 11:21:31 -04:00
Molly Struve
86cb66e858
[deploy] Feature: Serve Reading List from FeedContent Index (#10294)
* Feature:Serve Reading List from FeedContent Index
* Fix paging, order ID desc, improve comments
2020-09-17 17:20:14 -05:00
Molly Struve
e7e31f4d10
[deploy] Bug Fix/Optimization:Remove HttpCache from Github OauthClient (#10350) 2020-09-16 09:29:06 -05:00
Molly Struve
13fb5c4278
[deploy] Optimization:Store Podcast Ep Data in Redis, Rather than Sending as Sidekiq Argument (#10331) 2020-09-16 08:26:38 -05:00
rhymes
b90bbdd87a
[deploy] Fix URL.domain in development by correctly loading authentication providers (#10296) 2020-09-13 16:49:18 -05:00
Molly Struve
313bfef28c
[deploy] Feature:Allow for Search by ID for FeedContent (#10289) 2020-09-11 14:45:23 -05:00
Ben Halpern
3a469a99e2
[deploy] Enable admin-configured app_domain (#10206)
* Move app_domain from env var to siteconfig *within app area*

* Fix SiteConfig

* Don't change URL.domain yet

* Not use in fastly cache purge yet

* Session store magoo

* Revert domain issue

* Add SetCookie middleware

* Temporarily remove cookie middleware and release tasks

* Re-enable SetCookieDomain

* Add some more comments, get it ready for testing

* Remove host from url options and temporarily show errors

* Allow forwarded host to be cookie

* Fix typo

* Change invalidAuthenticityToken

* Properly set app domain

* Proper Fastly cache

* Remove config.app_domain

* Remove config.app_domain

* Explicitely set remember_user_token

* More play with cookies

* Fiddle with remember_user_token

* Add remember_user_token changes

* Monkeypatch devise

* Sessions controller

* Include rememberable

* Include rememberable

* Proper cookie monkeypatch

* Proper cookie monkeypatch

* Proper cookie monkeypatch

* Remove extra cookie code

* User sign in tweak

* Close the loop

* Experiment with carrierwave public_url

* Finalize carrierwave monkeypatch

* Remove async controller specs

* Change some tests

* Update domain test

* Remove temporary production.rb change

* modify cookie logic

* Remove unneeded changes

* Remove unneeded changes

* Explicitely pass host

* Fix linting

* Fix social image test

* Add some cookie tests

* Modify article url

* Fix canonical urls

* Fix typo

* Remove sessions controller

* Remove devise monkeypatch

* Add monkeypatch

* Remove elsif

* Update spec/helpers/application_helper_spec.rb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Adjust remember_cookie_sync

* Remember user token experimentation

* Fiddle with devise

* Properly configure devise

* Fix typo

* Fix formatting issue

* Add comment about middleware

* Fix typo

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

* Remove commented-out code

Co-authored-by: Michael Kohl <citizen428@dev.to>
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2020-09-11 09:38:34 -04:00
Molly Struve
9c7c4e7062
[deploy] Optimization:Increase refresh_interval For Possible High Indexing Indexes (#10215) 2020-09-09 17:07:15 -05:00
Mac Siri
9ebd742712
[deploy] Reintroduce sticky_nav changes (ab81f36 & 7f92855) (#10263)
* Revert "[deploy] Revert removal of unneeded eager load (if needed) (#10179)"

This reverts commit 11c7b148da.

* Revert "[deploy] Revert "Migrate ProfileImage to Images::Profile (#10055)" (#10149)"

This reverts commit 5657067e55.
2020-09-09 15:33:13 -04:00
Michael Kohl
4ae59b56e3
Add custom profile fields (#10202)
* Add custom_profile_fields table

* Add CustomProfileField model and refactor

* Remove trailing whitespace

* Stop ignoring removed column

* Add explanatory comment

* Update service object

* Fix bug in service object

* Refactor and fix specs

* Increase limit from 3 to 5

* Update comment to reflect code changes
2020-09-09 14:37:15 +00:00
rhymes
2d881ef571
Routine rubocop fixes (#10237) 2020-09-08 12:06:47 -04:00
Molly Struve
dcc43c0715
Optimization:Select Only Necessary Columns from Ahoy Messages For Digest Emails (#10194) 2020-09-03 16:46:33 -04:00
Molly Struve
d0d3c2a2ab
[deploy] Bug Fix:Sort Reactions by created_at (#10171) 2020-09-03 14:18:02 -05:00
Michael Kohl
d284e597cd
[deploy] Add Profiles::Update service object (#9912)
* Add Profiles::Update service object

* Refactor

* Rename Profile.fields to Profile.attributes

* Keep sync from user -> profile

* And and update comments

* Rename Profile.refresh_store_accessors!

* Make forwarding getters in user dynamic

* Add more explanation

* Fix typo

* Update service object

* Fix return value

* Fix specs

* Travis, let's be friends again?

* Remove Travis change

* Add require_dependency in Profile

* Refactor

* More refactoring

* Avoid double sync

* Fix specs

* Fix mapped attributes sync
2020-09-03 09:19:25 -04:00
Molly Struve
34593b7ec3
[deploy] Optimization:Select Article Columns for Digest Email, Limit 6, Use User Attributes (#10147) 2020-09-02 11:31:43 -05:00
Michael Kohl
f023c6174f
[deploy] Add data update script for profile fields (#10119) 2020-09-02 09:54:04 +07:00
Molly Struve
5657067e55
[deploy] Revert "Migrate ProfileImage to Images::Profile (#10055)" (#10149)
This reverts commit ab81f36a38.
2020-09-01 18:28:58 -05:00
Mac Siri
ab81f36a38
[deploy] Migrate ProfileImage to Images::Profile (#10055) 2020-09-01 17:16:03 -04:00
Diogo Osório
a5e7b1cf60
Rely on error types to determine when a repo should be removed on the RepoSyncWorker (#10131)
* Registers the Github AcocuntSuspended & RepositoryUnavailable errors

Adds the above-mentioned errors to the list of known errors raised by
Octokit as to make possible for the rest of the application to
specifically trap those.

* Makes the RepoSyncWorker error handling rely on types

The current implementation attempted to parse the error message to
determine if the error reported by Github's API can/should be handled,
this commit changes the implementation so that the exception type is
used instead.
2020-09-01 15:01:23 -04:00
Andy Zhao
0b849341e0
Remove ghostify from app (#10139)
* Remove ghostify from app

* Remove unused ghostify specs
2020-09-01 13:39:39 -04:00
Ben Halpern
7b5bc89b7c
Allow admins to set brand color (#10097)
* Allow admins to set brand color

* Remove extra line

* Fix linting

* Update app/controllers/admin/configs_controller.rb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Move wcag compare to own class

* Remove unnecessary spacing

Co-authored-by: Michael Kohl <citizen428@dev.to>
2020-09-01 11:16:31 +02:00
Molly Struve
667f3c9edf
[deploy] Refactor:Email Digest Sending Logic (#10107) 2020-08-31 14:28:55 -05:00
Michael Kohl
cfe288d8cc
[deploy] Start ignoring group column for profile fields (#10045)
* Start ignoring group column for profile fields

* Fix specs

Co-authored-by: mstruve <mollylbs@gmail.com>
2020-08-31 10:16:37 +07:00
Molly Struve
4bf5b858f9
[deploy] Bug Fix:Run Individual Digest Workers inline for DEV (#10070) 2020-08-29 09:25:54 -05:00
Molly Struve
8a44eb9421
[deploy] Refactor:Cleanup Naming and Optimize Email Digest Code (#10054) 2020-08-28 13:36:11 -05:00
rhymes
ba8b3dd443
[deploy] Add missing dependent clauses to User and cleanup relations (#10011)
* Add dependent: :destroy relation to user.notes

* Add cleanup script for orphaned notes

* Reorder relations and reorganize specs in User

* Update specs as notes are not needed after a user is deleted

* Tweets can just be nullified

* Add other cleanup scripts

* Tell the specs we keep tweets

* Fix comments

* Keep page_views and rating_votes when a user is deleted

* Fix specs
2020-08-28 20:19:24 +02:00
rhymes
c9e401758a
[deploy] Add dependent clauses to Article and fix Comment validation (#9990)
* Add dependent clauses to Article model

* Comment should be valid without a commentable

* Add cleanup scripts

* Cache the comments ids before destroying the article

* Add dependent clause to Article.user_subscriptions as well

* Fix specs
2020-08-28 18:24:28 +02:00
Ben Halpern
239629c1de
[deploy] Grant admin permissions through the UI (part 1) (#9656)
* Grant permissions through the UI

* Update app/services/moderator/manage_activity_and_roles.rb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Make roles into constants

* Swap internal and admin

* Improve UI, remove hack

* Fix link

* Remove unused internal file

* Modify registrations controller

* A bit of progress

* More work

* a bit pf progress on confirmation emails

* Get basic functionality in place

* Remove comments

* First basic test

* Add tests

* Fix code styles

* Remove sessions spec

* Remove sessions spec

* Remove extra markup

* Fix base role

* Add Resource Admin Config

* Fix indentation issue

Co-authored-by: Michael Kohl <citizen428@dev.to>
2020-08-28 11:57:06 -04:00