MNT-23233: get users according to providers configuration (#7924)

This commit is contained in:
Vítor Moreira 2022-10-28 11:32:30 +01:00 committed by GitHub
parent 32a3f9c9ef
commit 4410557d8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -80,14 +80,18 @@ export class AuthenticationService extends Authentication {
} }
private loadUserDetails() { private loadUserDetails() {
if (this.isALLProvider()) {
const ecmUser$ = from(this.peopleApi.getPerson('-me-')); const ecmUser$ = from(this.peopleApi.getPerson('-me-'));
const bpmUser$ = this.getBpmLoggedUser(); const bpmUser$ = this.getBpmLoggedUser();
if (this.isALLProvider()) {
forkJoin([ecmUser$, bpmUser$]).subscribe(() => this.onLogin.next()); forkJoin([ecmUser$, bpmUser$]).subscribe(() => this.onLogin.next());
} else if (this.isECMProvider()) { } else if (this.isECMProvider()) {
const ecmUser$ = from(this.peopleApi.getPerson('-me-'));
ecmUser$.subscribe(() => this.onLogin.next()); ecmUser$.subscribe(() => this.onLogin.next());
} else { } else {
const bpmUser$ = this.getBpmLoggedUser();
bpmUser$.subscribe(() => this.onLogin.next()); bpmUser$.subscribe(() => this.onLogin.next());
} }
} }