Commit be2b5559 by Will Daly Committed by AlasdairSwan

Use a 403 status to indicate that the user does not have a linked

account for third party auth.
parent 08e03ef3
...@@ -73,7 +73,6 @@ var edx = edx || {}; ...@@ -73,7 +73,6 @@ var edx = edx || {};
}, },
saveError: function( error ) { saveError: function( error ) {
// console.log(error.status, ' error: ', error.responseText);
this.errors = ['<li>' + error.responseText + '</li>']; this.errors = ['<li>' + error.responseText + '</li>'];
this.setErrors(); this.setErrors();
...@@ -83,13 +82,14 @@ var edx = edx || {}; ...@@ -83,13 +82,14 @@ var edx = edx || {};
* we need to prompt the user to enter a little more information * we need to prompt the user to enter a little more information
* to complete the registration process. * to complete the registration process.
*/ */
if (error.status === 403 && error.responseText === "third-party-auth" && this.currentProvider) { if ( error.status === 403 &&
error.responseText === "third-party-auth" &&
this.currentProvider) {
this.element.show( this.$alreadyAuthenticatedMsg ); this.element.show( this.$alreadyAuthenticatedMsg );
} else { } else {
this.element.hide( this.$alreadyAuthenticatedMsg ); this.element.hide( this.$alreadyAuthenticatedMsg );
// TODO -- display the error // TODO -- display the error
} }
} }
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment