Skip to content

Commit

Permalink
only display instfs pixel on enabled accounts
Browse files Browse the repository at this point in the history
fixes RECNVS-319

test-plan:
- have inst-fs configured with REQUIRE_AUTH=true
- have canvas _configured_ for inst-fs, but inst-fs not enabled
- in safari:
  - delete any inst-fs cookies and log out of canvas
  - log in
    - inst-fs login pixel should not be displayed (verify with network
      request log in browser)
    - no inst-fs cookie should have been created
  - enable inst-fs
  - refresh the page
    - inst-fs login pixel should be displayed
    - inst-fs cookie should have been created

Change-Id: Idecb926e8f17b5c29948b38fd8b5afc6c298d78a
Reviewed-on: https://gerrit.instructure.com/140938
Reviewed-by: Andrew Huff <[email protected]>
Tested-by: Jenkins
QA-Review: Collin Parrish <[email protected]>
Product-Review: Cody Cutrer <[email protected]>
  • Loading branch information
lukfugl authored and ccutrer committed Feb 15, 2018
1 parent 36466d2 commit cfe8da7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/inst_fs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def enabled?
end

def login_pixel(user, session)
if !session[:shown_instfs_pixel] && user && app_host
if !session[:shown_instfs_pixel] && user && enabled?
session[:shown_instfs_pixel] = true
pixel_url = login_pixel_url(token: session_jwt(user))
%Q(<img src="#{pixel_url}" alt="" role="presentation" />).html_safe
Expand Down

0 comments on commit cfe8da7

Please sign in to comment.