Merge branch 'develop' of code-repo.d4science.org:MaDgIK/openaire-library into develop
This commit is contained in:
commit
c803674ceb
|
@ -35,7 +35,11 @@ export class UserManagementService {
|
||||||
this.routerSubscription.unsubscribe();
|
this.routerSubscription.unsubscribe();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static userInfoUrl(index = 0): string {
|
||||||
|
return (isArray(properties.loginServiceURL)?properties.loginServiceURL[index]:properties.loginServiceURL) + UserManagementService.USERINFO;
|
||||||
|
}
|
||||||
|
|
||||||
public get user(): User {
|
public get user(): User {
|
||||||
return this.getUserInfoSubject.getValue();
|
return this.getUserInfoSubject.getValue();
|
||||||
}
|
}
|
||||||
|
@ -45,8 +49,7 @@ export class UserManagementService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public getUserInfoAt(index = 0): Observable<User> {
|
public getUserInfoAt(index = 0): Observable<User> {
|
||||||
return this.http.get<User>((isArray(properties.loginServiceURL)?properties.loginServiceURL[index]:properties.loginServiceURL) +
|
return this.http.get<User>(UserManagementService.userInfoUrl(index), CustomOptions.registryOptions()).pipe(map(userInfo => {
|
||||||
UserManagementService.USERINFO, CustomOptions.registryOptions()).pipe(map(userInfo => {
|
|
||||||
return new User(userInfo);
|
return new User(userInfo);
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue