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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user