fix: handle course access errors in Course Home side of things too (#558)

The courseware was properly reading the access errors and
redirecting the user as appropriate (like to the dashboard or
whatever).

This requires a backend change to push the error along.
This commit is contained in:
Michael Terry
2021-07-26 16:33:59 -04:00
committed by GitHub
parent be4375dd7c
commit c667e29492
16 changed files with 241 additions and 83 deletions

View File

@@ -117,7 +117,7 @@ export function fetchCourse(courseId) {
}
if (fetchedMetadata) {
if (courseMetadataResult.value.canLoadCourseware.hasAccess && fetchedBlocks) {
if (courseMetadataResult.value.courseAccess.hasAccess && fetchedBlocks) {
// User has access
dispatch(fetchCourseSuccess({ courseId }));
return;