fix: temporarily disable course-home denied redirects (#563)

They caused a regression when not logged in or enrolled. Will
hopefully re-enable after developing a fix.
This commit is contained in:
Michael Terry
2021-07-27 11:46:38 -04:00
committed by GitHub
parent e2b00d6684
commit 52750ef769
2 changed files with 6 additions and 4 deletions

View File

@@ -17,7 +17,7 @@ import {
} from '../../generic/model-store';
import {
fetchTabDenied,
// fetchTabDenied,
fetchTabFailure,
fetchTabRequest,
fetchTabSuccess,
@@ -62,9 +62,11 @@ export function fetchTab(courseId, tab, getTabData, targetUserId) {
logError(tabDataResult.reason);
}
if (fetchedCourseHomeCourseMetadata && !courseHomeCourseMetadataResult.value.courseAccess.hasAccess) {
// Disable the access-denied path for now - it caused a regression
/* if (fetchedCourseHomeCourseMetadata && !courseHomeCourseMetadataResult.value.courseAccess.hasAccess) {
dispatch(fetchTabDenied({ courseId }));
} else if (fetchedCourseHomeCourseMetadata && fetchedTabData) {
} else */
if (fetchedCourseHomeCourseMetadata && fetchedTabData) {
dispatch(fetchTabSuccess({ courseId, targetUserId }));
} else {
dispatch(fetchTabFailure({ courseId }));

View File

@@ -299,7 +299,7 @@ describe('DatesTab', () => {
});
});
describe('when receiving an access denied error', () => {
describe.skip('when receiving an access denied error', () => {
// These tests could go into any particular tab, as they all go through the same flow. But dates tab works.
async function renderDenied(errorCode) {