* Remove special handling of "connect" feedback by name
The special casing was related to "connect" feedback having both a
reporter and an offender. Check for offender instead.
Additionally, there was special casing in the controller to rate-limit
connect feedback separately from other channels. Since connect doesn't
exist, we should not need this.
There's a small bit of functionality (when I post to feedback_messages, the
number of feedback messages increases) that was removed from the test
case, we can add that back (and "connect" type, and
offender_id attributes) since it looks like it might have been a
useful assertion.
* Add back feedback message controller creates feedback message case
This was removed in the last commit because it was in a "connect" chat
channel context, but the basic "should persist a record" test was
otherwise valid. Submit an abuse-report rather than a connect message
report.
* typo
feeedback, woops.
* Create showModalAfterError function
* Show modal when comments rate limit is reached
* Show modal when article reaction rate limit is reached
* Show modal when follow user rate limit is reached
* Show form error when listing creation rate limit is reached
* Show form error when feedback messages rate limit is reached
* Rename functions for listings rate limit checks
* Show modal when notifications reaction rate limit is reached
* Show modal when picture upload rate limit reached
* Show modal for reactable objects when rate limit reached
* Add and modify tests
* empty commit
* Match modal messages to tests
* Fix error updating Modals
Co-authored-by: Dan Uber <dan@forem.com>
* Frontend Ready for Connect Report Abuse
* add feedback api
* js defination fix
* Added Hooks to the Component
* add json response in feedback
* Block popup added
* fix render issue
* Made changes in internal view
* change error message
* Added few design changes =
* add test cases
* Update app/javascript/chat/actions/requestActions.js
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
* add PR suggestions
* add backend test cases
* report abuse form close
* Update app/javascript/chat/actions/requestActions.js
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
* Update app/javascript/chat/ReportAbuse/index.jsx
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
* add test cases
* Update app/javascript/chat/ReportAbuse/index.jsx
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
* Update app/javascript/chat/ReportAbuse/index.jsx
Co-authored-by: Marcy Sutton <holla@marcysutton.com>
* Update app/javascript/chat/ReportAbuse/index.jsx
Co-authored-by: Marcy Sutton <holla@marcysutton.com>
* group the fieldset
* fix report abuse api
* fix test case
* fix request test case
* fix typo
* cleaned up markup in report abuse component.
* Fixed spacing between abuse options.
* Fixed wording in report abuse confirmation.
* Removed unnecessary data-testid and aria-label attributes.
* Added some top margin to the report abuse form.
* Update app/javascript/chat/message.jsx
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
* Added a legend to the the fieldset.
* Update app/javascript/chat/actions/requestActions.js
Co-authored-by: Michael Kohl <citizen428@dev.to>
Co-authored-by: Sarthak <7lovesharma7@gmail.com>
Co-authored-by: Narender Singh <narender2031@gmail.com>
Co-authored-by: Marcy Sutton <holla@marcysutton.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Michael Kohl <citizen428@dev.to>
* Split ReCaptcha service and use verbs instead of pronouns
* Inline comment rewrite for clarify
* after? > >
* Use explicit role check for the user instead of .auditable?
* Bypass recaptcha for authenticated users abuse reports
* Moves bypass_recaptcha? to helper method to have one definition of the criteria for this
* User must be 1 month old at least in order to bypass_recaptcha?
* Fixes test
* Better spec message
* Bypasses auditable users
* Adds better test coverage over recaptcha bypass cases
* include Helper removed from FeedbackMessagesController
* Adds some inline comments for clarity and banned check
* Add recaptcha keys to as site-configurable keys
* Add recaptcha to site config view
* Use site config key
* Make ReCAPTCHA tag optional if keys are blank
* Use proper capitalization of recaptcha
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
* Refactor logic for readability
* Use proper capitalization of recaptcha
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
* Use proper capitalization of recaptcha
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
* Use proper capitalization of recaptcha
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
* Add Slack::Announcer and SlackClient
* Add Slack::Messengers::Feedback class
* Use Slack::Messengers::Feedback and refactor test
* Should not raise an error if params are nil, let the job fail
* Add Slack::Messengers::Sponsorship
* Rename spec
* Use Slack::Messengers::Sponsorship
* Add Slack::Messengers::PotentialSpammer
* Use Slack::Messengers::PotentialSpammer
* Add Slack::Messengers::RateLimit and use it
* Refactor a bit and improve tests
* Add Slack::Messengers::Note and use it
* Use Slack::Announcer and fix spec
* Fix specs
* Update app/services/slack/announcer.rb
Co-Authored-By: Vaidehi Joshi <vaidehi.sj@gmail.com>
* Implement review suggestions
* Empty commit to trigger Travis
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
* Remove extraneous string conversion
* Add slack message for new notes
* Move status and minimize buttons to the bottom
* Add note model spec
* Remove extraneous param for reported links
* Fix weird breakpoint top-nav issue
* Fix error handling when submitting blank note
* Change status closed to invalid
* Add ability to sort between status
* WIP
* Add working views for new report page
* Add mailer WIP
* Add MVP of new reports system
* Move collapse to the right & add show page link
* Fix buttons for index page
* Change collapse to collapse/expand
* Remove email functionality from new report
* Update copy of report abuse responses
* WIP of showing emails in reports
* Fix notes for user_role_service.rb
* Remove unused scripts from internal.html.erb
* Update tests for reports dashboard
* Add missing migration file
* Add finishing touches to reports dashboard
* Remove deprecated methods
* Update view with better timestamps
* Update and write new tests
* Add .codeclimate.yml
* Remove commented out editor thing
* Undo commented out code for recaptcha method
* Undo comment out code for development
* Use new comment path instead of old comment path
* Add comment for public controllers
* Add block policy and specs
* Add policy for authorizing dashboard
* Add follow policy and specs
* Refactor a tiny bit
* Prevent banned users from following anything
* Add a note for email sub controller about auth
* Add image upload policies
* Add policy for github repos
* Fix typo and use correct github repo variable
* Fix image uploader and use regular params
* Add authenticate_user before action back in
* Rename test
* Update slack bot message formatting and fix reported URL
* Remove email blank onboarding redirect
* Add authorization specs for video upload
* Add registration spec
* Remove skip before actions for signup complete
* Use new param for abuse reports
* Remove else because it never runs
* Add more dashboard request specs
* Use let with no bang in case there are errors
* Move validations from controller to model
* Add new columns to feedback message model
* Use polymorphic notes relationship
* MVP of ticketing system
* Use new URL for reported_url param
* Add missing files
* Add validations and tests for feedback_messages
* Clean up some html
* Update create spec and add update spec
* Add mail tests and lint
* Add link to user profile