Skip to content

Commit

Permalink
Merge pull request #8233 from rajeshkumaravel/release-4.10.2
Browse files Browse the repository at this point in the history
Issue #SB-30708 #SB-30727 fix: Disable user on boarding workflow for managed user and SSO user
  • Loading branch information
rajeshkumaravel authored Aug 16, 2022
2 parents 63fe9b7 + f64b144 commit 23316c3
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions src/app/client/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,19 @@ export class AppComponent implements OnInit, OnDestroy {

this.setTagManager();
this.userService.userData$.subscribe((user: IUserData) => {
if (user.err) {
return throwError(user.err);
}
// If User is logged in and dob is missing, initiate consent workflow
if (!_.get(user, 'userProfile.dob') && this.userService.loggedIn) {
this.router.navigate(['/signup'], { queryParams: { loginMode: 'gmail' } });
}
});
if (user.err) {
return throwError(user.err);
}
// If User is logged in and dob is missing, initiate consent workflow
// Skip for managed users
// Skip for SSO users
if (!_.get(user, 'userProfile.dob') &&
(this.userService.loggedIn && !_.get(user, 'userProfile.managedBy')) &&
(_.isArray(user, 'userProfile.externalIds') && _.get(user, 'userProfile.externalIds').length === 0)
) {
this.router.navigate(['/signup'], { queryParams: { loginMode: 'gmail' } });
}
});
}

setTagManager() {
Expand Down

0 comments on commit 23316c3

Please sign in to comment.