fix: Check if feature is enabled before calling enterprise api

This fixes the issue of django messages being read before
redirecting to dashboard page, due to enterprise api being
called even if the feature is disabled.
This commit is contained in:
pkulkark
2022-07-05 14:27:31 +05:30
parent 4d6df67a02
commit df489bdf6e

View File

@@ -173,7 +173,7 @@
this.listenTo(this.subview.login, 'password-help', this.resetPassword);
// Listen for 'auth-complete' event so we can enroll/redirect the user appropriately.
if (!isTpaSaml) {
if (this.isEnterpriseEnable == true && !isTpaSaml) {
this.listenTo(this.subview.login, 'auth-complete', this.loginComplete);
} else {
this.listenTo(this.subview.login, 'auth-complete', this.authComplete);