Commit Graph

13 Commits

Author SHA1 Message Date
Jacob Burroughs 7dcc507d0a Rubocop for ruby 3.1
[skip-stages=Flakey]

Change-Id: I6abefdfa9fed6dd4525c8786e93efa548b3710f2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319603
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Isaac Moore <isaac.moore@instructure.com>
QA-Review: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Jacob Burroughs <jburroughs@instructure.com>
Build-Review: Jacob Burroughs <jburroughs@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
2023-06-06 16:44:26 +00:00
Cody Cutrer b2b0bff902 rubocop: Style/TernaryParentheses, Style/RedundantParentheses
[skip-stages=Flakey]

Change-Id: I8d860eedd8b199ed3adf0e2bf9162b43096c5347
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/315130
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Aaron Ogata <aogata@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Build-Review: Cody Cutrer <cody@instructure.com>
2023-04-12 14:56:48 +00:00
Cody Cutrer c2cba46851 RuboCop: Style/StringLiterals, Style/StringLiteralsInInterpolation
[skip-stages=Flakey]

auto-corrected

Change-Id: I4a0145abfd50f126669b20f3deaeae8377bac24d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/279535
Tested-by: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Migration-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
2021-11-25 14:03:06 +00:00
Cody Cutrer f5cdb0d986 RuboCop: Layout app/models
Change-Id: Ieae2904fb81739476d806b01bd7b4ff98c5ee35c
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/274155
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2021-09-22 19:32:32 +00:00
Chawn Neal dc5102367f simplify date handling for communication channel
refs VICE-1799
flag=none

TEST PLAN
1) Specs work.

Change-Id: I4dd5c7f9af4f56bbe3f9f7d8addcb37ff50a21b7
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/272167
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2021-08-25 02:17:54 +00:00
Chawn Neal d6bff31766 Fix Bounced emails search bug
fixes VICE-1799
flag=none

Ruby returned a datetime in non ISO format,
which broke in the JS.
see > BouncedEmailsView component and
    > FriendlyDatetime component
the fix is to return a datetime in ISO

TEST PLAN:
  1) Specs pass.
  SETUP
  1) First run:
   RAILS_LOAD_ALL_LOCALES=1 bundle exec rake canvas:compile_assets
   (
    You can ignore or remove afterwards by running:
    bundle exec rake canvas:compile_assets
   )
  2) Then Start your server with:
   RAILS_LOAD_ALL_LOCALES=1 bundle exec rails server
  3) Go to http://localhost:3000/accounts/2/settings
   a) Set your language to English Australia
  4) Create a bounced email. The easiest method,
  open a rails console and copy the command in the ticket's
  comment section.
  5) goto http://localhost:3000/accounts/2/admin_tools
   your account user admin tools.
  6) click bounced emails
  7) for address set *@*
  8) you should see your bounced email.
  9) To see the original error:
   replace:
    value_generator.to_proc.call(cc)&.to_time&.iso8601
   with:
    value_generator.to_proc.call(cc)
   then:
    preform the search a again.
    you will have a broken ui.

Change-Id: Icb2f4517bc070f7717a076a300633e76ef21a52d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/271825
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Reviewed-by: Drake Harper <drake.harper@instructure.com>
QA-Review: Drake Harper <drake.harper@instructure.com>
Product-Review: Drake Harper <drake.harper@instructure.com>
2021-08-25 01:03:04 +00:00
Jeremy Stanley 42deabaed7 bounced email search admin tool
test plan:
 - simulate bounced emails in the Rails console. do this for a handful
   of users, putting different details in each:
     cc = User.find(x).communication_channel
     cc.bounce_count = 1
     cc.last_bounce_at = 10.days.ago
     cc.last_bounce_details = {'bouncedRecipients' => [{'diagnosticCode' => '550 some error'}]}
 - ensure the "bounced emails" admin tool appears if the feature
   ("Bounced Emails Admin Tool") is enabled and the user has
   the requisite permissions, which include both :read_roster
   ("Users - view list") and either :view_notifications on the
   root account level ("Notifications - view"), which requires the
   "Admins can view notifications" account setting to be enabled,
   or :read_messages ("View notifications sent to users") on the
   site admin level
 - click the button without entering a search term and the most
   recent addresses appear (let's be real: they all appear,
   because you don't have 1000 of them)
 - enter a search term and click the button, and matching
   addresses appear
 - the date filtering should work

flag = bounced_emails_admin_tool
closes LS-1587

Change-Id: I38174d5422f6c4417d7c5e6856256061a8bfc2be
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251572
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Robin Kuss <rkuss@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
2020-12-08 02:08:47 +00:00
Cody Cutrer 548a2a1732 update all invocations of send_later and friends to new syntax
Change-Id: I7f40ed058b50882121da69f0cb05966854b8e920
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250924
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2020-10-30 19:13:54 +00:00
Cody Cutrer f299f76b75 add # frozen_string_literal: true for models
Change-Id: I70825be7ec7e24458afe0c63dc48c5a76158f520
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251150
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2020-10-28 22:08:12 +00:00
Cody Cutrer c5227d3f1b shackles was renamed to guardrail
closes FOO-989, FOO-990

Change-Id: I49dfa130cb74c34dd0eb25952790176ae4951058
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/249365
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-10-06 19:23:08 +00:00
Rob Orton b5de0458d9 dots and new lines
test plan
 - specs should pass

Change-Id: Iafc7c9b8ca64f32568e658b600e19c2e6f9045ca
Reviewed-on: https://gerrit.instructure.com/138026
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2018-01-17 16:56:26 +00:00
Landon Wilkins 91a87b3834 da licença part 10
add consistent license headers to all source files

Change-Id: I4c479c0c4b9d6d9d1d567f3bcb35ea376794bc14
Reviewed-on: https://gerrit.instructure.com/110030
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-04-28 17:30:08 +00:00
Alex Boyd 3fcec37017 Add bulk communication channel confirm endpoints
Fixes CNVS-28150

Test plan:
 - Add an unconfirmed communication channel
 - Hit /api/v1/accounts/.../unconfirmed_communication_channels.csv
   and ensure the channel shows up
 - Post to
   /api/v1/accounts/.../unconfirmed_communication_channels/confirm
 - Ensure the channel is now confirmed
 - Add an unconfirmed channel with an email address that doesn't
   contain an "@" sign
 - Hit /api/v1/accounts/...unconfirmed_communication_channels.csv
   and ensure the channel does not show up
 - Hit the above URL with ?with_invalid_paths=true appended and
   ensure the channel now shows up

Change-Id: Id7c3844e06e3fe997aed8baa363b5a9deababe97
Reviewed-on: https://gerrit.instructure.com/74926
Tested-by: Jenkins
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Alex Boyd <aboyd@instructure.com>
2016-04-04 22:26:04 +00:00