Commit f80696b
committed
fix file preview for hidden and nonexistent files
test plan:
1. enable "better file browsing"
2. go to the files page
3. click the cloud icon next to a file, select "Restricted Access",
and then "Only available to students with link".
4. as a teacher, attempt to preview the file. you should see the
file, not a not-found error.
5. attempt to preview a nonexistent file by going to the URL
/courses/X/files/Y/file_preview
(where X is a *valid* course ID and Y is an *invalid* file id).
you should see an error message without Canvas chrome
(no header or left-side menu)
fixes CNVS-16394
Change-Id: I9c632d664e9fd8758dc63b21e6751a914f4a4ceb
Reviewed-on: https://gerrit.instructure.com/43175
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>1 parent 2af63dd commit f80696b
2 files changed
Lines changed: 16 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
53 | 58 | | |
54 | 59 | | |
55 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| |||
104 | 106 | | |
105 | 107 | | |
106 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
107 | 116 | | |
0 commit comments