[Monitor Dashboard|Trunk]
AdminDashboard Guard: correct query params for user nfo page git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor_dashboard@59443 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
6a8ed470f7
commit
25053f5d84
|
@ -25,11 +25,11 @@ export class AdminDashboardGuard implements CanActivate, CanLoad {
|
||||||
return (Session.isPortalAdministrator(user) || Session.isCommunityCurator(user) || Session.isMonitorCurator(user));
|
return (Session.isPortalAdministrator(user) || Session.isCommunityCurator(user) || Session.isMonitorCurator(user));
|
||||||
}));
|
}));
|
||||||
obs.pipe(filter(isLoggedIn => !isLoggedIn)).subscribe(() => {
|
obs.pipe(filter(isLoggedIn => !isLoggedIn)).subscribe(() => {
|
||||||
this.router.navigate(['/user-info'], {queryParams: {'errorCode': LoginErrorCodes.NOT_ADMIN, path}});
|
this.router.navigate(['/user-info'], {queryParams: {'errorCode': LoginErrorCodes.NOT_ADMIN, 'redirectUrl':path}});
|
||||||
});
|
});
|
||||||
return obs;
|
return obs;
|
||||||
} else {
|
} else {
|
||||||
this.router.navigate(['/user-info'], {queryParams: {'errorCode': LoginErrorCodes.NOT_LOGIN, path}});
|
this.router.navigate(['/user-info'], {queryParams: {'errorCode': LoginErrorCodes.NOT_LOGIN, 'redirectUrl':path}});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue