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() {
|
ngAfterViewInit() {
|
||||||
this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => {
|
this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => {
|
||||||
this.user = user;
|
this.user = user;
|
||||||
if (this.user) {
|
|
||||||
if (this.paramsSubscription instanceof Subscription) {
|
if (this.paramsSubscription instanceof Subscription) {
|
||||||
this.paramsSubscription.unsubscribe();
|
this.paramsSubscription.unsubscribe();
|
||||||
}
|
}
|
||||||
this.paramsSubscription = this.route.queryParams.subscribe(params => {
|
this.paramsSubscription = this.route.queryParams.subscribe(params => {
|
||||||
if (params && params['verify']) {
|
if (params && params['verify']) {
|
||||||
|
if (this.user) {
|
||||||
this.subscriptions.push(this.userRegistryService.getInvitation(params['verify']).subscribe(verification => {
|
this.subscriptions.push(this.userRegistryService.getInvitation(params['verify']).subscribe(verification => {
|
||||||
this.verification = verification;
|
this.verification = verification;
|
||||||
if (this.user.email === this.verification.email.toLowerCase() && this.id === this.verification.entity && this.type === this.verification.type) {
|
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 => {
|
}, error => {
|
||||||
this.openErrorModal();
|
this.openErrorModal();
|
||||||
}));
|
}));
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
this.router.navigate(['/user-info'], {
|
this.router.navigate(['/user-info'], {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
|
@ -136,6 +134,8 @@ export class RoleVerificationComponent implements OnInit, OnDestroy, AfterViewIn
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue