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

account for third party auth.
This commit is contained in:
Will Daly
2014-10-23 14:19:25 -04:00
committed by AlasdairSwan
parent 08e03ef380
commit be2b55590c

View File

@@ -73,7 +73,6 @@ var edx = edx || {};
},
saveError: function( error ) {
// console.log(error.status, ' error: ', error.responseText);
this.errors = ['<li>' + error.responseText + '</li>'];
this.setErrors();
@@ -83,13 +82,14 @@ var edx = edx || {};
* we need to prompt the user to enter a little more information
* 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 );
} else {
this.element.hide( this.$alreadyAuthenticatedMsg );
// TODO -- display the error
}
}
});