Merge pull request #15391 from edx/bexline/ent_authentication_flow
ENT-447 Add ability to hide auth warnings for enterprise context.
This commit is contained in:
@@ -74,6 +74,7 @@
|
||||
this.supportURL = options.support_link;
|
||||
this.passwordResetSupportUrl = options.password_reset_support_link;
|
||||
this.createAccountOption = options.account_creation_allowed;
|
||||
this.hideAuthWarnings = options.hide_auth_warnings || false;
|
||||
|
||||
// The login view listens for 'sync' events from the reset model
|
||||
this.resetModel = new PasswordResetModel({}, {
|
||||
@@ -131,7 +132,8 @@
|
||||
platformName: this.platformName,
|
||||
supportURL: this.supportURL,
|
||||
passwordResetSupportUrl: this.passwordResetSupportUrl,
|
||||
createAccountOption: this.createAccountOption
|
||||
createAccountOption: this.createAccountOption,
|
||||
hideAuthWarnings: this.hideAuthWarnings
|
||||
});
|
||||
|
||||
// Listen for 'password-help' event to toggle sub-views
|
||||
@@ -167,7 +169,8 @@
|
||||
fields: data.fields,
|
||||
model: model,
|
||||
thirdPartyAuth: this.thirdPartyAuth,
|
||||
platformName: this.platformName
|
||||
platformName: this.platformName,
|
||||
hideAuthWarnings: this.hideAuthWarnings
|
||||
});
|
||||
|
||||
// Listen for 'auth-complete' event so we can enroll/redirect the user appropriately.
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
this.passwordResetSupportUrl = data.passwordResetSupportUrl;
|
||||
this.createAccountOption = data.createAccountOption;
|
||||
this.accountActivationMessages = data.accountActivationMessages;
|
||||
this.hideAuthWarnings = data.hideAuthWarnings;
|
||||
|
||||
this.listenTo(this.model, 'sync', this.saveSuccess);
|
||||
this.listenTo(this.resetModel, 'sync', this.resetEmail);
|
||||
@@ -193,8 +194,10 @@
|
||||
if (error.status === 403 &&
|
||||
error.responseText === 'third-party-auth' &&
|
||||
this.currentProvider) {
|
||||
this.clearFormErrors();
|
||||
this.renderAuthWarning();
|
||||
if (!this.hideAuthWarnings) {
|
||||
this.clearFormErrors();
|
||||
this.renderAuthWarning();
|
||||
}
|
||||
} else {
|
||||
this.renderErrors(this.defaultFormErrorsTitle, this.errors);
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
this.errorMessage = data.thirdPartyAuth.errorMessage || '';
|
||||
this.platformName = data.platformName;
|
||||
this.autoSubmit = data.thirdPartyAuth.autoSubmitRegForm;
|
||||
this.hideAuthWarnings = data.hideAuthWarnings;
|
||||
|
||||
this.listenTo(this.model, 'sync', this.saveSuccess);
|
||||
},
|
||||
@@ -63,7 +64,7 @@
|
||||
// Must be called after postRender, since postRender sets up $formFeedback.
|
||||
if (this.errorMessage) {
|
||||
this.renderErrors(formErrorsTitle, [this.errorMessage]);
|
||||
} else if (this.currentProvider) {
|
||||
} else if (this.currentProvider && !this.hideAuthWarnings) {
|
||||
this.renderAuthWarning();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user