Fix bug with redirect to login caused by fixed of role verification
This commit is contained in:
parent
ac58161c93
commit
56a8a035cc
|
@ -104,12 +104,12 @@ export class RoleVerificationComponent implements OnInit, OnDestroy, AfterViewIn
|
|||
ngAfterViewInit() {
|
||||
this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => {
|
||||
this.user = user;
|
||||
if (this.user) {
|
||||
if (this.paramsSubscription instanceof Subscription) {
|
||||
this.paramsSubscription.unsubscribe();
|
||||
}
|
||||
this.paramsSubscription = this.route.queryParams.subscribe(params => {
|
||||
if (params && params['verify']) {
|
||||
if (this.user) {
|
||||
this.subscriptions.push(this.userRegistryService.getInvitation(params['verify']).subscribe(verification => {
|
||||
this.verification = verification;
|
||||
if (this.user.email === this.verification.email.toLowerCase() && this.id === this.verification.entity && this.type === this.verification.type) {
|
||||
|
@ -126,8 +126,6 @@ export class RoleVerificationComponent implements OnInit, OnDestroy, AfterViewIn
|
|||
}, error => {
|
||||
this.openErrorModal();
|
||||
}));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.router.navigate(['/user-info'], {
|
||||
queryParams: {
|
||||
|
@ -136,6 +134,8 @@ export class RoleVerificationComponent implements OnInit, OnDestroy, AfterViewIn
|
|||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue