fix assignment index course homepage for invitation previews

fixes CNVS-15496

test plan:
- create a course (not public)
- set the home page to be the assignment list
- invite a user
- in an incognito window, load the invitation link (/courses/x?invitation=zzz)
- it should load

Change-Id: Ia2d2274a4a3b1f7d1c76cd891f03a2c5c9c02d11
Reviewed-on: https://gerrit.instructure.com/41344
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>