Commit Graph

331 Commits

Author SHA1 Message Date
Wyatt Johnson 5714f441bb [CORL-735] Scraper support for JSON Linked Data (#2671)
* feat: add support for application/json+ld parsing

- upgraded scraper packages to use new jsonld parser
- waiting on https://github.com/microlinkhq/metascraper/pull/225
  for merging
- fixes #2670

* chore: metascraper upgrades
2019-10-24 16:08:15 +00:00
Wyatt Johnson 626d46d813 [CORL-726] Repeat Comment Fix (#2655)
* fix: strip tags when comparing for repeat

- share the stripped tag version of the comment
- share the logger to improve pipeline clarity

* fix: renamed variables based on review
2019-10-21 18:34:41 +00:00
Wyatt Johnson d169d3dd51 fix: allow unknown fields (#2640) 2019-10-16 18:52:33 -04:00
Wyatt Johnson b38a4f117b [CORL-667] Constraint Directive (#2641)
* feat: added constraints

* fix: fixes bug with index creation

- fixes #2612

* fix: added default resolver

* fix: added defaultTo to handle defaulting
2019-10-16 18:44:44 -04:00
Tessa Thornton ea71230b90 [CORL_653] throw error if inviting existing users (#2637)
* throw error if inviting existing users

* check for existing users before sending out any invites

* fix lints
2019-10-16 16:28:49 -04:00
Tessa Thornton 9df473178b [CORL-8] prevent repeat comments (#2632)
* prevent users from reposting the same comment

* fix tests

* fix lints

* update comments for users service

* make updates based on review
2019-10-16 15:51:34 +00:00
Vinh 3bfcc509d2 [CORL-678] Transition to eslint (#2634)
* chore: setup eslint

* chore: tslint checks with types & check for import order

* chore: complete eslint transition

* fix: tests

* fix: linting after rebase, faster lint for lint-staged

* chore: remove line

* fix: lint rules

* feat: add a11y linter and fix errors

* fix: tests
2019-10-15 22:56:38 +00:00
Wyatt Johnson 8d08382aea feat: skip username validation for SSO users (#2627) 2019-10-15 21:56:47 +00:00
Wyatt Johnson 918ba10867 [CORL-681] Configurable Staff Badges (#2620)
* feat: added configurable staff badge

* fix: removed ambigous styles
2019-10-04 20:22:31 +00:00
Wyatt Johnson 191687335b [CORL-682] OIDC Email and setEmail mutation (#2623)
* fix: make email optional for oidc, fix schema perms

- fixes #2622

* fix: adjust defaults for heroku
2019-10-04 17:00:25 +00:00
Sami Safatli e56793f2fb Updated email templates (#2621) 2019-10-03 20:28:28 +00:00
Wyatt Johnson 6fe4646755 [CORL-668] User Comment Rate Limiting (#2616)
* feat: added user comment rate limiting

* fix: change 30 second to 3 second

* fix: moved file

* fix: services cleanup

* fix: changes based on review
2019-10-03 19:33:52 +00:00
Tessa Thornton dd45f46b19 update email templates (#2615) 2019-10-03 17:03:03 +00:00
Tessa Thornton 4a1492e88d [CORL-90] moderator notes (#2601)
* add moderator notes and mutations

* add create moderator note mutation

* add components for moderator notes

* style moderator notes

* update styles

* prevent warning about optimistic update unused fields

* fix incorrect comment

* fix optimistic response shape

* fix create note payload type

* add migration for moderator notes

* updates from feedback

* add border width for firefox
2019-10-02 18:41:53 +00:00
Cristian Dean d0df6bc849 Add missing translations pt-BR (#2604) 2019-10-01 19:37:25 +00:00
Vinh 808b355a27 [CORL-181] Comment Count Injection (#2581)
* feat: inject comment counts

* fix: tests

* feat: integrate stream embed with coral counts

* chore: refactor constants

* test: test for count bundle

* test: test live comment count integration with stream embed

* feat: use defer

* fix: snapshot

* feat: auto add count.js in when calling Coral.createStreamEmbed

* fix: tests

* fix: rm duplicate test

* chore: remove unuse file
2019-10-01 19:22:15 +00:00
Wyatt Johnson 53fa5f43e5 [CORL-325] Comment Search API (#2578)
* feat: added comment search support

* fix: updated readme

* Update README.md
2019-10-01 18:57:50 +00:00
Wyatt Johnson c045f52daa [CORL-649] Migrations (#2597)
* feat: added migration framework

* chore: added premod user status migration

* feat: enhanced error handling of migrations

* fix: added missing argument from abstract method

* fix: another templating blunder

* fix: removed debug code

* feat: enhanced migration tracking

* fix: remove skipping migrations

* feat: moved indexing to migration system

* fix: linting
2019-10-01 16:00:27 +00:00
Cristian Dean b3b26bd9f3 Remove X-Powered-By header (#2605) 2019-10-01 15:35:32 +00:00
Wyatt Johnson 0af2fec31b fix: include tenantID in query operation to improve index use (#2596) 2019-09-30 16:25:55 +00:00
Tessa Thornton e61e62a238 [CORL-174] premod user (#2572)
* add types for setting user premod

* add types, fields, and mutations for user premod

* enforce premoderation on users marked premod

* add user premod to dropdown

* update specs

* fix tests

* update premod workflow to match v4

* allow user filtering by premod status

* add premod user history to account actions drawer

* update snaps

* fix permissions on new premod fields

* update strings

* fix tests

* clean up formatting and copy

* fix: nullable fixes pre-migration
2019-09-25 21:31:12 +00:00
Cristian Dean 37e39ff8c5 Avoid compute metrics with 404 status code (#2587) 2019-09-23 21:26:47 +00:00
Wyatt Johnson fe2d78f1f7 [CORl-640] User Registration Race (#2583)
*  fix: fixes user registration endpoints

- fixes #2579

* feat: cleanup from review

- Added seperate create function
- Moved some validation around

* fix: linting
2019-09-23 21:11:16 +00:00
Kim Gardner 43844bca18 Danish translation fixes (#2582)
* Update da files for email and errors

* Update da translations

* Add errors translations
2019-09-23 15:03:44 -04:00
Tessa Thornton b3064c89de [CORL-623] add live updates for comments moving from premod to approved (#2571)
* add live updates for comments moving from premod to approved

* rename disposables

* check if comment is system withheld as well as premod to publish event
2019-09-20 20:11:05 +00:00
Wyatt Johnson 25c7f89b31 [CORL-620] Persisted Query Improvements (#2567)
* fix: resolves #2566

* fix: improved retry logic
2019-09-19 18:49:57 +00:00
Wyatt Johnson 921461008e [CORL-621] Auth Fixes (#2569)
* fix: resolve error with redirects

- fixes #2529

* fix: apply validations to username for oidc

* fix: converted components to function components

* fix: snapshots
2019-09-18 14:01:06 -04:00
Wyatt Johnson 64f102e6d4 [CORL-540] Logging improvements (#2565)
* fix: enhanced errors around story creation

* feat: enhanced child loggers

* feat: logging enhancements
2019-09-18 13:07:42 -04:00
Nick Funk 741739bc16 Un-feature a comment when it is rejected (#2555)
Also decrements the featured count for the story if rejected using the
in-stream moderation.

CORL-554
2019-09-18 12:17:31 -04:00
Sami Safatli 2cc32d4332 Translation pt-BR (#2542) 2019-09-18 11:47:34 -04:00
Tessa Thornton 8ef366f132 move toxic comment detection ahead of recent history in moderation pipeline (#2562) 2019-09-13 20:21:23 +00:00
Vinh 2559d1c0e8 fix: turn off bidi characters in favor of <bidi> tags (#2557) 2019-09-12 16:10:17 +00:00
Kim Gardner 721b2e7d67 [CORL-527] English copy tweaks (#2546)
* English copy tweaks

* fix: unit tests

* Use reactions to be more general

* fix: snapshots
2019-09-10 20:55:34 +07:00
Nick Funk f9e1bf144e [CORL-523] Document GraphQL mutations for managing accounts (#2544)
* Create preliminary endpoint for updating user names via API

CORL-523

* Create preliminary endpoint for updating user emails via API

CORL-523

* Create preliminary endpoint for deleting users via the API

CORL-523

* Hook up the delete, update email, and update user name endpoints

CORL-523

* Update readme to include preliminary GDPR endpoint instructions

CORL-523

* Uncomment limiters on updateEmail endpoint

My mistake leaving these commented while testing, should not have been committed.

CORL-523

* Run DocToc on the README to generate table of contents

CORL-523

* feat: enhanced documentation on account management edges

* fix: prevent double delete of user account

* fix: swapped order of params

* Update README.md

* Update README.md

* fix: remove unknown field title

* fix: remove unknown field title on story
2019-09-10 20:16:40 +07:00
Tessa Thornton 36225e443b [CORL-556] Allow session length configuration (#2530)
* make session duration configurable by tenant

* fix expiration date calculation

* add form field for session length

* use constant for default session

* update spec

* update fixtures

* add missing translation

* update snap

* fix: use shared variable instead of hardcoded value for tests

* fix: adjusted missing expires in parameter
2019-09-10 08:06:07 +00:00
Tessa Thornton ac203607ae [CORL-561, CORL-562] Comment stream and account profile styling cleanup (#2517)
* update styles for comment stream

* more comment styling fixes

* reconfigure settings tab and account settings in stream

* add new button variant

* style settings tab

* style change username/email/password

* clean up settings tab

* integrate account deletion to account settings

* update comment history styles

* more history comment styles

* update snaps

* move userbox

* fix tests

* fix delete account tests

* update message box styling

* update snap

* update snaps

* fix lints

* update snaps again

* userbox styles

* history comment styling

* update snaps

* fix ts

* Integrate notifications settings

* clean up account setting styles

* update snaps and tests

* fix lints

* fix: PENDING_DELETION permissions

* chore: sync stable classnames, rename settings to account

* simplify css

* update snaps
2019-09-06 13:41:55 -04:00
Nick Funk e49905c5ad [CORL-571] Filter empty strings from banned and suspect word lists (#2521)
* Filter empty strings from banned and suspect word lists

CORL-571

* fix: changed form
2019-09-05 21:36:09 +00:00
Wyatt Johnson 60a1f43d51 fix: wrap queries in quotes (#2527) 2019-09-05 18:06:12 +00:00
Wyatt Johnson 3c9ebcf1a1 feat: added moderation email notifications (#2525) 2019-09-05 17:33:49 +00:00
Wyatt Johnson e35978096f feat: added featured comment notifications (#2524) 2019-09-05 17:10:03 +00:00
Wyatt Johnson 04c56b3fb5 [CORL-406] Tenant Locale Selection (#2450)
* feat: added preload config

* feat: support changing locale

* fix: name case

* fix: removed unused code

* feat: added translations for default reactions

* fix: do not translate icon

* fix: shorter i18n keys
2019-09-05 17:02:06 +00:00
Wyatt Johnson efea0e8e1c [CORL-498, CORL-495, CORL-539, CORL-496, CORL-494] Email Notifications Support & Framework (#2498)
* chore: renamed old templates

* feat: initial notifications support

* feat: email enhancements

* fix: linting

* feat: initial digesting beheviour

* feat: added notification configuration

* feat: added unsubscribe routes

* fix: fixed failing snapshots/tests bc random ids

* feat: adjusted the save beheviour, added tests

* feat: added tests

* feat: added staff replies

* feat: renamed E-Mail to Email

* feat: enhanced cron processing

* fix: linting + updating tests

* feat: enhanced cron context

* fix: added staff replies back in
2019-09-05 07:02:26 +00:00
Wyatt Johnson 0fad1070a6 fix: addressed issue with count doubling (#2518) 2019-09-04 17:33:42 -04:00
Wyatt Johnson ac1ed45e4b [CORL-588] Download and token fixes (#2519)
* fix: fixed up download handler to improve error handling

* fix: fixed invalid expiry date being set

* fix: nick found bug
2019-09-04 17:23:59 -04:00
Nick Funk a696ef9be5 [CORL-572] Filter rejected comments from reply counts on user comment history (#2516)
* Filter rejected comments from reply counts on user comment history

CORL-572

* fix: use cache to improve performance

* fix: added TODO
2019-09-04 12:43:00 -04:00
Tessa Thornton fcf3640adc [CORL-439] Allow admins to configure GDPR features (#2497)
* allow tenant admins to modify commenter account features

* style account features configuration

* prevent changing username or downloading comments based on tenant settings

* update fixtures and snaps

* add i18n strings

* update snap
2019-09-03 16:56:36 -06:00
Nick Funk 46f0d08cf7 [CORL-236] Allow user to delete their account (#2495)
* Create preliminary account deletion program flow

Does not validate password as of yet.
Does not submit a mutation to begin deletion scheduling.

CORL-236

* Create preliminary account deletion confirmation form and schema mutation

Hooks up validation and error handling to confirm the user's
password during account deletion.

Scheduling the account deletion is not implemented yet.

CORL-236

* Update requestAccountDeletion to set the user's scheduled deletion date

CORL-236

* Create preliminary cron job for scheduled account deletions

CORL-236

* Show tombstoned comments when the user has deleted their account and comments

CORL-236

* Pull in client locales for date formatting on account deletion steps

CORL-236

* Update more areas due to comment revision being nullable

CORL-236

* Allow users to cancel their account deletion request

CORL-236

* Show account deletion callout at the top of the profile stream tab

CORL-236

* Further comments and edge case handling for deleted comments site wide

CORL-236

* Show account deletion callout in the comments stream tab

CORL-236

* Send out emails during relevant account deletion events

- Confirm deletion requested
- Cancellation of deletion request
- Account deletion completed

CORL-236

* Unset emails when deleting user accounts instead of setting to null

Fixes email index collision error from setting multiple emails to null.

CORL-236

* Show organization email in account deletion steps

CORL-236

* Mark comments as deleted so that we can properly tombstone them in the stream

CORL-236

* Fix improper templating for account deletion completed emails

Sub organization name in where previously we were using the account username.

CORL-236

* Disable user drawer and display deleted flag on users in community

CORL-236

* Check for author before passing inReplyTo in ModerateCardContainer

Sometimes null when user is deleted.

CORL-236

* Tombstone moderate cards when the underlying comment is deleted

CORL-236

* Re-add deleted field to CommentContainer fragment

CORL-236

* Disable commenting or replying when user is scheduled for deletion

CORL-236

* Add snapshot tests around deletion states for comment cards and forms

CORL-236

* Add tests around the account deletion steps

CORL-236

* Set account deletion to run every 30 minutes

CORL-236

* Rename DELETION authorization to PENDING_DELETION

CORL-236

* Change log message for when account deletion tasks finds no more users to delete

CORL-236

* Update snapshots to handle proper deleted flag for scheduled deleting users

CORL-236

* Fix import ordering on various files to match coding standards

CORL-236

* Specify tenantID when querying for user during deletion

CORL-236

* Add back missing clientMutationId on cancelAccountDeletion mutation

CORL-236

* Use $unset to clear the scheduledDeletionDate

CORL-236

* Simplify create of scheduledAccountDeletion CRON function

CORL-236

* Rename and organize scheduledTask creation logic

- Rename startCronJobs to startScheduledTasks
- Return an object of named ScheduledTask items instead of an array of tasks

CORL-236

* Add comment about returning updated user when clearing scheduledDeletionDate

CORL-236

* Remove unnecessary array around tenant.locale in dateTime formatter

CORL-236

* Remove unnecessary non-null enforcement on tenant.id

CORL-236

* Remove string templated React element content

CORL-236

* Move english translated validation error to correct language file

CORL-236

* Simplify rendering of DeletionRequestCallout when deletionDate isn't available

CORL-236

* Use ternary expression instead of multiple {bool && (...)} checks

CORL-236

* Use classes object with line child style to style the step bar

CORL-236

* Update StepBar so that children of Step nodes can be undefined

Allows us to not have to insert empty placeholder strings/elements when
we want to have an empty step node.

CORL-236

* Remove use of luxon from account deletion request callouts for now

We need to decide if the extra 15KB from luxon is worth it in our bundles
before making this change.

CORL-236

* Remove unnecessary embed/deleteAccount endpoint

CORL-236

* Move DeleteAccountModal contents into a separate component

Cleans up the state management when user closes the modal and we
need the modal steps to restart.

CORL-236

* Remove localization around delete account button icon

CORL-236

* Use inline `collection(mongo)` in clearing and setting deletion date

CORL-236

* Simplify form state validation on account deletion confirm page

CORL-236

* Add todo to iterate over tenants in account deletion

CORL-236

* Remove punctuation and add context to logger messages during account deletion

CORL-236

* Break out mongo collection initialization into a shared object

Also adds a try catch error handling around the scheduled deletion
operations. Prevents errors from taking the server down.

CORL-236

* Add TODO to extract out a common formatter for date times

CORL-236

* Update translations for account deletion details

CORL-236

* Update translations for account deletion completion page

CORL-236

* During scheduled deletion, when locking deletion date, return modified user

CORL-236

* Remove un-necessary fragment container around deletion steps component

CORL-236

* Move preventSubmit outside of render function on ConfirmPage

CORL-236

* Convert collections into object of Mongo db collection initializers

Allows us to only initialize the collections we need with our
Mongo instance.

CORL-236

* Remove un-necessary lambda wrapping around collections initializer functions

CORL-236
2019-09-03 16:38:43 -06:00
Tessa Thornton 0e37a474fa downloads by user id (#2500) 2019-08-23 16:05:53 -04:00
Tessa Thornton ffecd5e981 change routing for auth and auth/callback (#2493) 2019-08-23 15:00:36 -04:00
Wyatt Johnson 2edabf44c7 feat: added closedAt to createStory mutation (#2496) 2019-08-23 14:01:43 -04:00