Commit graph

91 commits

Author SHA1 Message Date
Ben Halpern
e76f6cbbba
Set Stripe dynamically instead of at boot (#9862)
* Set Stripe dynamically instead of at boot

* Add stripe SiteConfig

* Fix capitalization
2020-08-19 21:24:19 -04:00
Ben Halpern
6c71369df5
[deploy] Add community_name to site config (#9864)
* Add community_name to site config

* Fix a spec

* Remove SiteConfig from constants

* Change subjects to method

* Fix subjects method

* Fix linting
2020-08-19 14:54:40 -04:00
Molly Struve
91c6541f57
Bug Fix:Validate User Password Length is Between 8-100 characters (#9447) 2020-07-22 11:40:23 -04:00
Michael Kohl
a4dadfb728
Standardize ActiveRecord order clauses (#9395)
* Change simple order clauses

* Change nested order clauses
2020-07-20 10:00:51 -04:00
rhymes
696c712883
Rubocop: routine fixes (#9345)
* rubocop -A

* Fix Style/HashLikeCase

* regenerated todo file
2020-07-16 18:18:13 +02:00
Molly Struve
fad259b1c8
[deploy] Bug Fix: Remove Rails Validation for Follow Uniqueness, Guard against dup Follow Jobs (#9222) 2020-07-09 09:50:06 -05:00
rhymes
5b62811c98
[deploy] Rubocop: fix violations of Layout/LineLength (#9197) 2020-07-08 08:36:36 -05:00
Molly Struve
1c461f8891
[deploy] Remove Unused Pro Memberships (#7894) 2020-05-20 11:54:30 -05:00
Alex
004dbba500
[deploy] Remove logging of image data to Datadog (#7829) 2020-05-13 16:23:42 -04:00
rhymes
3d313efbd6
Fix profile page rendering when a username contains spaces (#7787) 2020-05-13 08:37:50 +02:00
rhymes
81fff248dd
Refactoring GitHub Repos functionality - step 1 (#7764)
* Rename find_or_create to upsert and improve validation and testing

* Add User.authenticated_through?

* Refactor settings/integrations

* Refactor profile github repositories rendering

* Refactor repos fetching

* Only fetch a single repo and improve error messages

* Remove unused code

* Cleanups

* Fix specs

* Remove trailing whitespace

* Fix spec

* Trigger Travis
2020-05-12 13:48:19 +02:00
Michael Kohl
6979209cd2
Implement review comments (#7704) 2020-05-07 16:25:29 +02:00
Molly Struve
56636f26c1
Dont Allow Multiple User Destroy Requests (#7685) 2020-05-06 09:01:23 -04:00
Vaidehi Joshi
692243ab50
Allow admins to configure default users to follow during onboarding (#7637) [deploy]
* Allow admins to suggest default users to follow during onboarding

Allows the onboarding "follow users" slide to be configured by admins.
Closes https://github.com/thepracticaldev/dev.to/issues/7106.

* Remove redundant safety checks, refactor specs

* Add explicit note about how suggested users are used in onboarding

* Some configs_controller cleanup and fix copypasta in configs/show template

* Fetch SiteConfig.suggested_users via before_action

* Use presence instead of empty?
2020-05-01 14:03:48 -07:00
Alex
5060652939
Validate images are files (#7639)
* Validate images are files

* Skip image validation if there aren't any images
2020-05-01 10:39:20 -04:00
rhymes
c7c498834f
[deploy] Authentication refactoring: generalize account settings (#7597)
* Rename remove_association to remove_identity and future proof its tests

* Use the signin_path everywhere

* Generalize account settings

* Use delegation
2020-04-30 17:29:53 +02:00
Ridhwana
b9a8d87e95
[deploy] Refactor to create a helper for the mailer links (#7502)
* refactor: set the email_from to use in teh defaults

* chore: remove some new lines

* feat: add a mail link helper that can be used in the views

* feat: returns the default if it doesn't understand the parameter

* feat: Quick replacement of links

* feat: allow subject to be passed through

* chore: update all hrefs

* chore: remove rel attribute

* chore: mail link

* update spec

* chore: space

* chore: update some whitespaces and emails

* style

* chore: PR mail_link to email_link and the comment

* feat: PR suggestions for encoding

* feat: use mail_to
2020-04-27 09:18:16 -04:00
Alex
b6664456c0
[deploy] Validate filenames server-side (#7405) 2020-04-23 14:30:59 -05:00
Ridhwana
17fdc556ee
Generalization: Replace static dev emails with configurable ones. (#7438)
* feat: update the email addresses in the site config

* chore: update the default email address everywhere

* feat: update the template for the config

* chore: remove default_site_mail as an allowed parameter

* feat: change biz@dev.to to teh business email address and with a subject

* feat: update partners@dev.to to use SiteConfig.email_addresses[:business]

* feta: update to business email address

* feat: update members@dev.to to use the site config

* feat: update privacy email

* chore: Anna's suggestion to loop through object instead of keys
2020-04-23 11:26:58 +02:00
Anna Buianova
983c3d28dd
Replaced remaining hardcoded DEV with the configurable community name (#7435)
* Replaced hardcoded DEV and dev.to remainders with the configurable name
* Removed hardcoded dev.to from the rss feed
2020-04-22 17:16:21 +03:00
Alex
10c1882548
[deploy] Log image data to Datadog for file name too long error (#7200)
* Log image data to Datadog for file name too long error

* Add guard for when no images are found
2020-04-09 18:25:26 -04:00
Vaidehi Joshi
9cebaa53e7
Avoid clobbering user attributes with empty params during onboarding (#7016) [deploy] 2020-04-01 16:56:10 -07:00
Ben Halpern
6d6a36f3dd
[deploy] Fix small onboarding issues (#6963)
* Fix small onboarding issues

* Fix whitespace
2020-03-30 20:43:33 -04:00
Andy Zhao
1a989bef07
[deploy] Add response templates to user settings (#6823)
* Add response templates controller, routes, and view

* Add response templates settings page

* Remove dead code

* Use proper variable oops

* Use proper indentation

* Use before action for checking current_user

* Remove index action temporarily

* Use url helpers for redirects

* Use form_with over form_tag and form_for

* Persist previous content if edit fails

* Use exists for performance

* Remove index spec and add CRUD specs

* Memoize @response_template

* Use workaround for sad paths b/c render doesn't work

* Refactor and extract permitted_attributes into var

* Use present over exists to preload into memory

* Use last over first

* Lint for codeclimate

* Use two redirects for happy and sad create path

* Remove proper index route oops

* Codeclimate comma sigh
2020-03-26 14:48:00 -04:00
Michael Kohl
244ab297c8
Move user following suggestions to internal API (#6601) [deploy] 2020-03-13 13:37:24 +01:00
Liz Fong-Jones
283afe291e
[honeycomb] make error reporting concise (#6553) [deploy] 2020-03-09 15:01:24 -04:00
Liz Fong-Jones
48f4c2cafe
Error message & bad request on failed user update (#6509)
* Error message & bad request on failed user update

* Update users_controller.rb
2020-03-06 16:29:21 -05:00
Andy Zhao
0f9b52f800
Use post instead of get for CSRF (#6026) 2020-02-11 17:56:11 -05:00
Ben Halpern
2add3ae300
Replace dev.to with ApplicationConfig in a few locations (#6008) [deploy]
* Replace dev.to with ApplicationConfig in a few locations

* Update app/labor/badge_rewarder.rb
2020-02-11 14:48:27 -05:00
rhymes
c41d66e900
Replace ban/banned with suspend/suspended in user facing text (#5816) [deploy] 2020-02-10 10:12:53 -05:00
Molly Struve
bbeb3fc79d
Ensure user is authenticated before doing onboarding Actions (#5937)
* ensure user is authenticated before doing onboarding checks

* add specs for authenticating users for onboarding updates
2020-02-07 09:56:29 -05:00
Michael Kohl
7270d5ab4c
Move user deletion by moderator to worker (#5887) [deploy] 2020-02-05 08:27:07 -05:00
Maykon Menezes
7ad7320add Worker/user self delete (#5698)
* Moving user self delete job to sidekiq

* Refactor/user self delete worker
2020-01-27 08:45:58 -05:00
Alex
62f3e31698
Move RssReaderFetchUserJob to Sidekiq (#5685) [deploy]
* Create RssReaderFetchUserWorker

* Create RssReaderFetchUserWorker spec

* Update reference to RssReaderFetchUserWorker

* Update spec for clarity

- Update fake user_id to 9999
- Update return for user.feed_url

* Add feed_url check before calling worker

* Update random user_id for queue test

* Update fake user_id argument in spec
2020-01-24 14:14:20 -08:00
Alex
4a7ecb2574
Move ExportContentJob to Sidekiq (#5688) [deploy]
* Create ExportContentWorker

* Create ExportContentWorker spec

* Update references to ExportContentWorker

* Fix UserSettings spec for sending email
2020-01-24 10:12:58 -08:00
Mac Siri
5f020860af Allow for proper deselect of email_newsletter (#5675) 2020-01-23 16:59:17 -05:00
Michael Kohl
dba7e6ca60 Move Twitch webhook registration from ActiveJob to Sidekiq (#5414) 2020-01-14 11:55:35 -05:00
Anna Buianova
851508f628 Fix a bug when user tries to delete an account while not having an email (#5486)
* Ask user to add email when deleting [WIP]

* Ask to provide an email before requesting account deletion

* Additional checks to make sure that user won't be deleted w/o an email

* Revert changes on confirm destroy view
2020-01-13 08:34:37 -05:00
Cadu Ribeiro
00a97b2051 Migrate Users/FollowJob to Sidekiq (#5403) 2020-01-08 15:03:18 -05:00
Michael Kohl
728a05c476 Move from env variables to SiteConfig (#5385) [deploy]
* Move from env variables to SiteConfig

Related to #5384

This PR only deals with the first remaining part outlined in the issue, starting to use existing SiteConfig keys instead of the env variables.

* Restore Envfile to original version for now
2020-01-07 16:36:24 -05:00
Keith Bennett
3c980e7b83 Fix long line lints (#5062) 2019-12-26 13:24:24 -05:00
Molly Struve
aa9361798d
Return not_found response rather than trying to authorize a nil object (#5093) [deploy] 2019-12-13 09:39:40 -06: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
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
Mohab Abd El-Dayem
2c80e9da42 Make The Default Email An Enviroment Variable. (#4677)
* Make the default email an enviroment variable

* Added spaces in Envfile for readability
2019-11-01 09:03:06 -04:00
rhymes
e31128dcb7 Enforce ruby19_no_mixed_keys Style/HashSyntax (#4588) 2019-10-25 10:27:55 -04:00
Ben Halpern
4ea7b03727
Add new font and theme config, plus new navbar config option (#4462)
* Initial changes for some new themes/fonts/etc.

* Add basic navbar config

* Finalize navbar config

* Make config_navbar non nullable

* Add dark_theme? to user decorator
2019-10-24 08:38:46 -04:00
Omar Bahareth
ccb64e7f25 Refactor UsersController#handle_settings_tab (#4492) [ci skip] 2019-10-18 15:57:12 -04:00
Juliette de Rancourt
d8e04a0a09 Remove duplication in users_controller.rb (#4337)
* Remove duplication

* Naming
2019-10-10 10:48:23 -04:00