Skip to content

Commit

Permalink
remove flag use_cloudfront_for_docviewer
Browse files Browse the repository at this point in the history
closes EVAL-2562
flag=use_cloudfront_for_docviewer

Test Plan:
- specs pass

Change-Id: Ieccc08e50bd2c2c975ba27ad423be0bc2659fb49
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/298287
Tested-by: Service Cloud Jenkins <[email protected]>
QA-Review: Spencer Olson <[email protected]>
Product-Review: Spencer Olson <[email protected]>
Reviewed-by: Kai Bjorkman <[email protected]>
  • Loading branch information
spencerolson committed Aug 17, 2022
1 parent 7b9d1a6 commit c2627e6
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
2 changes: 1 addition & 1 deletion app/controllers/canvadoc_sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def show
opts = {
preferred_plugins: [Canvadocs::RENDER_PDFJS, Canvadocs::RENDER_BOX, Canvadocs::RENDER_CROCODOC],
enable_annotations: blob["enable_annotations"],
use_cloudfront: Account.site_admin.feature_enabled?(:use_cloudfront_for_docviewer)
use_cloudfront: true
}

submission_id = blob["submission_id"]
Expand Down
5 changes: 0 additions & 5 deletions config/feature_flags/apogee_release_flags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ grade_calc_ignore_unposted_anonymous:
state: on # enable for local development
test:
state: on # enable for the deployed 'test' environment
use_cloudfront_for_docviewer:
state: hidden
applies_to: SiteAdmin
display_name: Use CloudFront for DocViewer
description: Request that DocViewer use CloudFront for serving pdf assets.
gradebook_csv_export_order_matches_gradebook_grid:
state: hidden
applies_to: SiteAdmin
Expand Down
9 changes: 1 addition & 8 deletions spec/controllers/canvadoc_sessions_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -667,19 +667,12 @@
expect(@student.unread_submission_annotations?(@submission)).to eq false
end

it "passes use_cloudfront as true when feature flag is set to true" do
Account.site_admin.enable_feature!(:use_cloudfront_for_docviewer)
it "passes use_cloudfront as true" do
expect(@attachment.canvadoc).to receive(:session_url).with(hash_including(use_cloudfront: true))

get :show, params: { blob: blob.to_json, hmac: hmac }
end

it "passes use_cloudfront as false when feature flag is not set to true" do
expect(@attachment.canvadoc).to receive(:session_url).with(hash_including(use_cloudfront: false))

get :show, params: { blob: blob.to_json, hmac: hmac }
end

it "passes user information based on the submission (if past submission / missing attachment assocation)" do
@submission.attachment_associations.destroy_all
expect(@attachment.canvadoc).to receive(:session_url).with(hash_including(user_id: @student.global_id.to_s))
Expand Down

0 comments on commit c2627e6

Please sign in to comment.