Revision 57547
Added by Konstantinos Triantafyllou over 4 years ago
adminLoginGuard.guard.ts | ||
---|---|---|
26 | 26 |
check(path: string): Observable<boolean> { |
27 | 27 |
let errorCode = LoginErrorCodes.NOT_LOGIN; |
28 | 28 |
const obs = this.propertiesService.subscribeEnvironment().pipe(mergeMap(properties => { |
29 |
return typeof document !== 'undefined' && this.userManagementService.getUserInfo(properties['userInfoUrl']).pipe(map( user => {
|
|
29 |
return this.userManagementService.getUserInfo(properties['userInfoUrl']).pipe(map( user => { |
|
30 | 30 |
if(user) { |
31 | 31 |
errorCode = LoginErrorCodes.NOT_ADMIN; |
32 | 32 |
} |
Also available in: Unified diff
[Library]: Check if is Client on userInfo method.