File tree Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import PropTypes from 'prop-types';
99import { windowScrollTo } from '../../data/utils' ;
1010import {
1111 FORBIDDEN_REQUEST ,
12+ FORBIDDEN_USERNAME ,
1213 INTERNAL_SERVER_ERROR ,
1314 TPA_AUTHENTICATION_FAILURE ,
1415 TPA_SESSION_EXPIRED ,
@@ -48,6 +49,9 @@ const RegistrationFailureMessage = (props) => {
4849 case TPA_SESSION_EXPIRED :
4950 errorMessage = formatMessage ( messages [ 'registration.tpa.session.expired' ] , { provider : context . provider } ) ;
5051 break ;
52+ case FORBIDDEN_USERNAME :
53+ errorMessage = formatMessage ( messages [ 'registration.forbidden.username' ] ) ;
54+ break ;
5155 default :
5256 errorMessage = formatMessage ( messages [ 'registration.empty.form.submission.error' ] ) ;
5357 break ;
Original file line number Diff line number Diff line change @@ -11,3 +11,4 @@ export const FORM_SUBMISSION_ERROR = 'form-submission-error';
1111export const INTERNAL_SERVER_ERROR = 'internal-server-error' ;
1212export const TPA_AUTHENTICATION_FAILURE = 'tpa-authentication-failure' ;
1313export const TPA_SESSION_EXPIRED = 'tpa-session-expired' ;
14+ export const FORBIDDEN_USERNAME = 'forbidden-username' ;
Original file line number Diff line number Diff line change @@ -162,6 +162,11 @@ const messages = defineMessages({
162162 defaultMessage : 'Registration using {provider} has timed out.' ,
163163 description : '' ,
164164 } ,
165+ 'registration.forbidden.username' : {
166+ id : 'registration.forbidden.username' ,
167+ defaultMessage : 'Usernames can\'t include words that could be mistaken for course roles. Please choose a different username.' ,
168+ description : '' ,
169+ } ,
165170 'registration.tpa.authentication.failure' : {
166171 id : 'registration.tpa.authentication.failure' ,
167172 defaultMessage : 'We are sorry, you are not authorized to access {platform_name} via this channel. '
You can’t perform that action at this time.
0 commit comments