fix: prevent integrity signature creation while masquerading (#665)

This commit is contained in:
Bianca Severino
2021-10-06 11:26:04 -04:00
committed by GitHub
parent 0889b17e85
commit 0bc7faaa56
3 changed files with 12 additions and 6 deletions

View File

@@ -5,19 +5,19 @@ import { getConfig, history } from '@edx/frontend-platform';
import { FormattedMessage, injectIntl, intlShape } from '@edx/frontend-platform/i18n';
import { ActionRow, Alert, Button } from '@edx/paragon';
import { useModel } from '../../../../generic/model-store';
import { saveIntegritySignature } from '../../../data';
import messages from './messages';
function HonorCode({ intl, courseId }) {
const dispatch = useDispatch();
const { isMasquerading } = useModel('coursewareMeta', courseId);
const siteName = getConfig().SITE_NAME;
const honorCodeUrl = `${process.env.TERMS_OF_SERVICE_URL}#honor-code`;
const honorCodeUrl = `${getConfig().TERMS_OF_SERVICE_URL}#honor-code`;
const handleCancel = () => history.push(`/course/${courseId}/home`);
const handleAgree = () => {
dispatch(saveIntegritySignature(courseId));
};
const handleAgree = () => dispatch(saveIntegritySignature(courseId, isMasquerading));
return (
<Alert variant="light" aria-live="off">