Commit Graph

2072 Commits

Author SHA1 Message Date
rubic0n 73c0e50936 Prevent constant ElasticAPM warnings in development by disabling it
No changes are needed in prod, since the `enabled` setting defaults
to "true", and prod obviously isn't setting this ENV.
2021-02-13 23:20:43 -06:00
rubic0n f472a6154e Mark the replicas as replicas
Rails won't even attempt to write to a replica. Without this option,
a write attempt would actually run against Postgres, and it would
be up to Postgres to throw a readonly error.

Additionally, marking it as a replica teaches ActiveRecord that it
should not attempt to run migrations against this connection.

https://api.rubyonrails.org/classes/ActiveRecord/DatabaseConfigurations.html#method-i-configs_for

I'm actually pretty sure that the lack of `replica: true`
is why there's currently a db/slave1_schema.rb and db/slave2_schema.rb
2021-02-13 23:20:43 -06:00
rubic0n 903b6c7969 Simplify database.yml by merging in default options
Anything in the &default section can be merged in using <<: *default
In this case, the default already specifies that the adapter is
postgresql, the timeout is 5000, the encoding is unicode. It also
already specified the db pool, but the default actually checked 2
different ENVs and provided a fallback if it's not provided.
Lastly, I was able to move the prepared_statements section to the
defaults, because the .env.vagrant file doesn't specify
ENV['PREPARED_STATEMENTS'], development still just sets it to
'false'.
2021-02-13 23:20:43 -06:00
rubic0n 70c44fc68d Fix vagrant now that Rails 6 replicas are being used 2021-02-13 23:20:43 -06:00
rubic0n 6221581cf0 Create script to generate dummy data, for perf investigation 2021-02-13 23:20:43 -06:00
rubic0n 1179957a32 Start redis server on VM boot
Otherwise you have to start it yourself after vagrant halt / vagrant up
2021-02-13 23:20:43 -06:00
rubic0n 9331f06784 Add rack-mini-profiler, to diagnose perf issues 2021-02-13 23:20:43 -06:00
Developer 0341cd8572 Updated RegistrationsController captcha values
• Updated:
- RegistrationsController captcha values
2021-02-13 13:31:57 -05:00
Fosco Marotto 7a2594e105 Add writing role for some moderation classes, update verification method. 2021-02-11 18:34:04 -05:00
Developer 5a5150757e Added spam, other account flags to reports page table list items
• Added:
- spam, other account flags to reports page table list items

• Removed:
- Account moderation notes count in reports table list item
2021-02-11 14:38:41 -05:00
Developer 2548205487 Updated ReportService to not create new reports if account is already suspended
• Updated:
- ReportService to not create new reports if account is already suspended
2021-02-11 14:30:37 -05:00
Fosco Marotto 4bb2f1b745 Verification requests should use the writing role 2021-02-11 01:18:36 -05:00
Developer 538bcf21c9 Updated registration page username to disallow unallowed characters
• Updated:
- registration page username to disallow unallowed characters (special characters, spaces, etc.) and rewrite if is written in that field
2021-02-11 00:57:48 -05:00
Developer 8a2f34d815 Added check in RegistrationsController to ensure email and password don't match
• Added:
- check in RegistrationsController to ensure email and password don't match. If so, return back to registration form with alert
2021-02-11 00:33:28 -05:00
Developer 39a3d44bdd Updated all admin moderation links from app popover menus to open in new tab
• Updated:
- all admin moderation links from app popover menus to open in new tab
- GroupOptionsPopover group admin moderation link
- ProfileOptionsPopover account admin moderation link
- StatusOptionsPopover account and status admin moderation links
2021-02-11 00:23:20 -05:00
Developer b636f36871 Added prop for openInNewTab in ListItem for Button links
• Added:
- prop for openInNewTab in ListItem for Button links
2021-02-11 00:21:44 -05:00
Developer 2fff6b3046 Fixed issue with empty featured group in FeaturedGroupsInjection
• Fixed:
- issue with empty featured group in FeaturedGroupsInjection

• Added:
- missing key in loop in FeaturedGroupsInjection render
2021-02-11 00:17:56 -05:00
Developer f56d177b9b Added ability to copy g/ group link in GroupHeader to clipboard
• Added:
- ability to copy g/ group link in GroupHeader to clipboard on then show an alert on desktop
2021-02-11 00:16:43 -05:00
mgabdev e3af1b4a26 Updated LinkBlock checks for if status text contains blocked domain
• Updated:
- LinkBlock checks for if status text contains blocked domain
- normalize_link to use domain instead of normalized_host

• Added:
- normalize_link_domain to check for if entire domains are blocked or not for spam
2021-02-11 00:01:45 -05:00
mgabdev d73b4afa28 Updated random int function to use helper numbers util in ws stream.js
• Updated:
- random int function to use helper numbers util in ws stream.js
2021-02-10 23:21:35 -05:00
mgabdev 72162affcf Updated stream ws to close if backend api error
• Updated:
- stream ws to close if backend api error and not retry over and over again
2021-02-10 23:08:00 -05:00
Developer a42b7797d8 Updated websocket.js to @gamestdio/websocket
• Updated:
- websocket.js (depreacated) to @gamestdio/websocket (latest)
2021-02-10 20:11:18 -05:00
Developer 488a362129 Updated labels and hints in user registration form
• Updated:
- labels and hints in user registration form
- Made clear requirements for usernames

• Removed:
- question of "Are you human?" in the captcha label as people were answering "yes" in the input instead of the captcha value
2021-02-10 13:48:13 -05:00
Developer 8b8f73deb1 Added back account autofill mention in composer
• Added:
- account autofill mention in composer after removing for performance reasons

• Updated:
- throttle for account search function
2021-02-10 13:29:48 -05:00
Developer 4490070aa2 Updated Verification Requests page to include account display name
• Updated:
- Verification Requests page to include account display name
- position of date and account column in table
2021-02-10 12:59:30 -05:00
Developer 59484da4dc Updated FetchGroupsService to fetch featured groups that are not private and visible
• Updated:
- FetchGroupsService to fetch featured groups that are not private and visible
2021-02-10 12:43:23 -05:00
Developer 3e9e32b276 Updated lists to make account search work
• Updated:
- lists to make account search work for adding new members
2021-02-10 12:41:41 -05:00
Developer ab2521b880 Fixed issue with search icon in the search bar submitting the search
• Fixed:
- issue with search icon in the search bar submitting the search
2021-02-10 12:34:44 -05:00
Developer 05cfd3e06d Updated @clusterws/cws node package to latest version (3.0.0)
• Updated:
- @clusterws/cws node package to latest version (3.0.0)
2021-02-10 12:26:17 -05:00
Developer 578da9faae Updated node engine value to >=10.13
• Updated:
- node engine value to >=10.13
2021-02-10 12:25:29 -05:00
Developer 30c05a6e96 Added new flags to admin dashboard account search
• Added:
- new flags to admin dashboard account search for PRO, investor, donor, verified
- moved spam to the flags column instead of next to username

• Removed:
- IP Address in account list

• Updated:
- Title for flags in account moderation header
2021-02-10 12:24:09 -05:00
Fosco Marotto 65d8c7ee86 Possible fix for home timeline 2021-02-10 11:02:54 -05:00
Fosco Marotto cacfb6e7ba Possible doorkeeper fix 2021-02-10 00:41:25 -05:00
Fosco Marotto a1a97bb483 Revert "Merge branch 'features/null_bearer2' into 'develop'"
This reverts commit c14fc2fa9d, reversing
changes made to 22c3fa995d.
2021-02-09 23:58:00 -05:00
Fosco Marotto ad35c7fa72 Revert "Merge branch 'fix_null_bearer' into 'develop'"
This reverts commit 22c3fa995d, reversing
changes made to 3931ba4f81.
2021-02-09 23:57:16 -05:00
Free Speech Forever c14fc2fa9d Merge branch 'features/null_bearer2' into 'develop'
Fix authorization header when no access token

See merge request gab/social/gab-social!58
2021-02-10 03:34:35 +00:00
Free Speech Forever 22c3fa995d Merge branch 'fix_null_bearer' into 'develop'
Avoid redundant Doorkeeper queries when not signed in

See merge request gab/social/gab-social!57
2021-02-10 03:33:16 +00:00
Free Speech Forever 3931ba4f81 Merge branch 'feature/worker-updates' into 'develop'
Some worker updates.

See merge request gab/social/gab-social!59
2021-02-10 03:32:48 +00:00
Fosco Marotto 729c00a5a9 Bundle of corrections and one doorkeeper writing role change 2021-02-09 22:32:24 -05:00
admin 382fd31ec7 Update database.yml 2021-02-09 19:41:12 +00:00
admin 669b378c6f Merge branch 'features/db-fun' into 'develop'
Replace Makara with an initial Rails 6 role based splitting method.

See merge request gab/social/gab-social!60
2021-02-09 19:38:10 +00:00
Free Speech Forever 473c48b2aa Replace Makara with an initial Rails 6 role based splitting method. 2021-02-09 19:38:10 +00:00
Fosco Marotto ae036995bf Fix authorization header when no access token 2021-02-09 11:16:04 -05:00
rubic0n 57a88c5904 Avoid redundant OAuth queries when not signed in
If you aren't signed in, you don't have an auth token.
When you don't have an auth token, React was sending the headers

"Authorization: Bearer null"

This caused 5 Doorkeeper token lookups using
WHERE "oauth_access_tokens"."token" = 'null'
on the Explore page (the root of the app when not signed in).
2021-02-06 22:41:35 -06:00
admin 31922ea58b Merge branch 'feature/home_feed4' into 'develop'
Feature/home feed4

See merge request gab/social/gab-social!56
2021-02-06 18:33:23 +00:00
azuregc7 e1a8d158d6 [home] Changed sort back to created_ad after adding new index to accounts 2021-02-06 09:48:18 -08:00
azuregc7 2baebbab18 [home] Changed sort back to created_ad after adding new index to accounts 2021-02-06 09:45:34 -08:00
azuregc7 dd6cbd0c17 Reduce home feed statuses per batch to 10 2021-02-05 15:58:01 -08:00
Fosco Marotto a43a7af771 Some worker updates. 2021-02-05 13:25:46 -05:00
Fosco Marotto c45d8adbf2 Another group collection controller sort change. 2021-02-05 00:12:51 -05:00